Bug 927239 - remove selected attribute from menu items when hiding context menu. r=jimm
authorSam Foster <sfoster@mozilla.com>
Fri, 08 Nov 2013 15:09:43 -0800
changeset 154200 ea7a81a92657fe86e3b9e2574976d7d5e13fefa4
parent 154199 b0773de630835537a2228f094c911f4a8cf8d670
child 154201 e49fc0c216b65270465ad4536b9f274f55b44f83
push id3438
push usersfoster@mozilla.com
push dateFri, 08 Nov 2013 23:10:28 +0000
treeherderfx-team@ea7a81a92657 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjimm
bugs927239
milestone28.0a1
Bug 927239 - remove selected attribute from menu items when hiding context menu. r=jimm
browser/metro/base/content/helperui/MenuUI.js
--- a/browser/metro/base/content/helperui/MenuUI.js
+++ b/browser/metro/base/content/helperui/MenuUI.js
@@ -239,16 +239,19 @@ var ContextMenuUI = {
       xPos: coords.x,
       yPos: coords.y,
       source: aMessage.json.source
     }));
     return true;
   },
 
   hide: function hide () {
+    for (let command of this.commands.querySelectorAll("richlistitem[selected]")) {
+      command.removeAttribute("selected");
+    }
     this._menuPopup.hide();
     this._popupState = null;
   },
 
   reset: function reset() {
     this._popupState = null;
   }
 };