Bug 599362 - Can still search in Awesome screen once the context menu is shown [r=vingtetun]
authorWesley Johnston <wjohnston@mozilla.com>
Mon, 18 Oct 2010 23:41:22 +0200
changeset 66850 c2191d3acb5e6666f979ab7be1940cdff21819a8
parent 66849 5fcc26816ca27924c289ac41fc5a60d336df6eef
child 66851 86e10d9e0ed58c480084871f89890dc954a077e2
push id1
push userroot
push dateTue, 26 Apr 2011 22:38:44 +0000
treeherdermozilla-beta@bfdb6e623a36 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersvingtetun
bugs599362
Bug 599362 - Can still search in Awesome screen once the context menu is shown [r=vingtetun]
mobile/chrome/content/browser-ui.js
mobile/chrome/content/browser.xul
--- a/mobile/chrome/content/browser-ui.js
+++ b/mobile/chrome/content/browser-ui.js
@@ -2491,16 +2491,17 @@ var ContextHelper = {
     // Allow the first and last *non-hidden* elements to be selected in CSS.
     first.setAttribute("selector", "first-child");
     last.setAttribute("selector", "last-child");
 
     let label = document.getElementById("context-hint");
     label.value = this.popupState.label || "";
 
     this._panel.hidden = false;
+    BrowserUI.blurFocusedElement();
     window.addEventListener("resize", this, true);
 
     this.sizeToContent();
     BrowserUI.pushPopup(this, [this._popup]);
     return true;
   },
 
   hide: function ch_hide() {
--- a/mobile/chrome/content/browser.xul
+++ b/mobile/chrome/content/browser.xul
@@ -248,17 +248,17 @@
                              autocompletesearch="history"
                              autocompletepopup="popup_autocomplete"
                              enablehistory="false"
                              maxrows="6"
                              completeselectedindex="true"
                              minresultsforpopup="0"
                              oncontextmenu="event.preventDefault();"
                              onsearchbegin="BrowserUI.updateAwesomeHeader(this.controller.searchString);"
-                             emptytext="&urlbar.emptytext;"
+                             placeholder="&urlbar.emptytext;"
                              flex="1"
                              readonly="true"
                              ontextentered="BrowserUI.goToURI();"
                              clickSelectsAll="true"/>
                     <hbox id="urlbar-icons" class="urlbar-cap-button" observes="bcast_urlbarState">
                       <toolbarbutton id="tool-reload" oncommand="CommandUpdater.doCommand(event.shiftKey ? 'cmd_forceReload' : 'cmd_reload');"/>
                       <toolbarbutton id="tool-stop" command="cmd_stop"/>
                       <toolbarbutton id="tool-search" command="cmd_opensearch"/>
@@ -392,17 +392,17 @@
                 <richlistitem id="addons-local" class="section-header" align="center" nohighlight="true">
                   <label value="&addonsLocal.label;" flex="1"/>
                   <spacer flex="1"/>
                   <button id="addons-update-all" label="&addonsUpdate.label;" hidden="true"
                           oncommand="ExtensionsView.updateAll();"/>
                 </richlistitem>
                 <richlistitem id="addons-repo" class="section-header" nohighlight="true">
                   <label value="&addonsRepo.label;" flex="1"/>
-                  <textbox id="addons-search-text" emptytext="&addonsSearch2.emptytext;" type="search" searchbutton="false"
+                  <textbox id="addons-search-text" placeholder="&addonsSearch2.emptytext;" type="search" searchbutton="false"
                            oncommand="ExtensionsView.getAddonsFromRepo(this.value);" onkeypress="if (event.keyCode == event.DOM_VK_RETURN) this.blur();"/>
                 </richlistitem>
               </richlistbox>
             </notificationbox>
           </vbox>
 
           <vbox id="downloads-container" flex="1">
             <richlistbox id="downloads-list" flex="1" onselect="this.ensureSelectedElementIsVisible()">