Bug 1292519 - Can't Ctrl+Tab away after typing something in the location bar. r?florian draft
authorDrew Willcoxon <adw@mozilla.com>
Fri, 05 Aug 2016 09:57:56 -0700
changeset 397306 6ff999d02ebbd1defba4ece2c1ed86e4e469382f
parent 397305 6140083fa3c90e1bce6646785584e177e9cf665d
child 527418 2238b8f6e3de1efaaa7b35e6d8deaec3b7e90d4f
push id25257
push userdwillcoxon@mozilla.com
push dateFri, 05 Aug 2016 16:58:28 +0000
reviewersflorian
bugs1292519
milestone51.0a1
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)) {