Bug 1292321 - Pressing tab key in address bar selects one-off search buttons instead of the entries in the history dropdown list. r=florian
☠☠ backed out by 5e26b1fa08a6 ☠ ☠
authorDrew Willcoxon <adw@mozilla.com>
Thu, 11 Aug 2016 14:46:02 -0700
changeset 400397 a31f07fbdc2e249f76469bc897bcad548a892417
parent 400396 89ba380478e36de087ba1c046b60363b956d4abc
child 400398 782f590541b8173cd1b073a88732afa601f05715
push id26138
push usergszorc@mozilla.com
push dateSat, 13 Aug 2016 03:04:36 +0000
reviewersflorian
bugs1292321
milestone51.0a1
Bug 1292321 - Pressing tab key in address bar selects one-off search buttons instead of the entries in the history dropdown list. r=florian MozReview-Commit-ID: 6hbW7n5jiLS
browser/base/content/urlbarBindings.xml
browser/components/search/content/search.xml
--- a/browser/base/content/urlbarBindings.xml
+++ b/browser/base/content/urlbarBindings.xml
@@ -1286,16 +1286,17 @@ file, You can obtain one at http://mozil
       <xul:richlistbox anonid="richlistbox" class="autocomplete-richlistbox"
                        flex="1"/>
       <xul:hbox anonid="footer">
         <children/>
         <xul:vbox anonid="one-off-search-buttons"
                   class="search-one-offs"
                   compact="true"
                   includecurrentengine="true"
+                  disabletab="true"
                   flex="1"/>
       </xul:hbox>
     </content>
 
     <implementation>
       <field name="_maxResults">0</field>
 
       <field name="_bundle" readonly="true">
--- a/browser/components/search/content/search.xml
+++ b/browser/components/search/content/search.xml
@@ -1745,17 +1745,18 @@
           let stopEvent = false;
 
           // Tab cycles through the one-offs and moves the focus out at the end.
           // But only if non-Shift modifiers aren't also pressed, to avoid
           // clobbering other shortcuts.
           if (event.keyCode == KeyEvent.DOM_VK_TAB &&
               !event.altKey &&
               !event.ctrlKey &&
-              !event.metaKey) {
+              !event.metaKey &&
+              this.getAttribute("disabletab") != "true") {
             stopEvent = this.advanceSelection(!event.shiftKey, false, true);
           }
 
           // Alt + up/down is very similar to (shift +) tab but differs in that
           // it loops through the list, whereas tab will move the focus out.
           else if (event.altKey &&
                    (event.keyCode == KeyEvent.DOM_VK_DOWN ||
                     event.keyCode == KeyEvent.DOM_VK_UP)) {