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
--- a/browser/base/content/urlbarBindings.xml
+++ b/browser/base/content/urlbarBindings.xml
@@ -1287,16 +1287,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
@@ -1746,17 +1746,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)) {