Bug 1501699 - Don't consume the Ctrl+Shift+Tab event when not actually handling it. r=jaws a=jcristau
authorDão Gottwald <dao@mozilla.com>
Tue, 06 Nov 2018 15:19:42 +0000
changeset 501081 663b37581fef75a2e7f0ee66218062c45ebf5944
parent 501080 1370c2a23ff7a681191c40ca9bd744b7597a3a75
child 501082 17c2c58a532880c11105c6f75df5c07eafe5c589
push id1864
push userffxbld-merge
push dateMon, 03 Dec 2018 15:51:40 +0000
treeherdermozilla-release@f040763d99ad [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjaws, jcristau
bugs1501699
milestone64.0
Bug 1501699 - Don't consume the Ctrl+Shift+Tab event when not actually handling it. r=jaws a=jcristau Differential Revision: https://phabricator.services.mozilla.com/D11024
browser/base/content/browser-ctrlTab.js
--- a/browser/base/content/browser-ctrlTab.js
+++ b/browser/base/content/browser-ctrlTab.js
@@ -425,27 +425,28 @@ var ctrlTab = {
     for (let preview of this.previews) {
       this.updatePreview(preview, null);
     }
   },
 
   onKeyDown(event) {
     if (event.keyCode != event.DOM_VK_TAB ||
         !event.ctrlKey ||
+        !this.isOpen && event.shiftKey ||
         event.altKey ||
         event.metaKey) {
       return;
     }
 
     event.preventDefault();
     event.stopPropagation();
 
     if (this.isOpen) {
       this.advanceFocus(!event.shiftKey);
-    } else if (!event.shiftKey) {
+    } else {
       let tabs = gBrowser.visibleTabs;
       if (tabs.length > 2) {
         this.open();
       } else if (tabs.length == 2) {
         let index = tabs[0].selected ? 1 : 0;
         gBrowser.selectedTab = tabs[index];
       }
     }