Bug 1292519 - Can't Ctrl+Tab away after typing something in the location bar. r=florian
authorDrew Willcoxon <adw@mozilla.com>
Mon, 08 Aug 2016 13:14:31 -0700
changeset 308650 c86dba04ed3d030385692c96280b7409577d5288
parent 308649 672c62e6203465e5a8a0db2f69a1aa291af105c7
child 308651 e0e5d6619a32fa9e62639efccab030f5b242df77
push id30546
push usercbook@mozilla.com
push dateTue, 09 Aug 2016 13:43:58 +0000
treeherdermozilla-central@0813514a828b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersflorian
bugs1292519
milestone51.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1292519 - Can't Ctrl+Tab away after typing something in the location bar. r=florian MozReview-Commit-ID: Gz8odgQl9oM
browser/components/search/content/search.xml
--- a/browser/components/search/content/search.xml
+++ b/browser/components/search/content/search.xml
@@ -1741,17 +1741,22 @@
         <body><![CDATA[
           if (!this.popup) {
             return false;
           }
 
           let stopEvent = false;
 
           // Tab cycles through the one-offs and moves the focus out at the end.
-          if (event.keyCode == KeyEvent.DOM_VK_TAB) {
+          // 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) {
             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)) {