Skip to content

Commit 1ba22ab

Browse files
committed
Suppress Ctrl-Tab/Ctrl-Shift-Tab specific reactions, when a collapsed tab get focused by other actions e.g. clicking on a native tab #3729
1 parent add9165 commit 1ba22ab

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

webextensions/background/handle-tab-focus.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ Tab.onActivating.addListener(async (tab, info = {}) => { // return false if the
9292
log(' lastActiveTab: ', win.lastActiveTab); // it may be blank on a startup
9393
const lastActiveTab = Tab.get(win.lastActiveTab || info.previousTabId);
9494
cancelDelayedExpand(lastActiveTab);
95-
let shouldSkipCollapsed = (
95+
const shouldSkipCollapsed = (
9696
!info.byInternalOperation &&
9797
mMaybeTabSwitchingByShortcut &&
9898
configs.skipCollapsedTabsForTabSwitchingShortcuts
@@ -144,13 +144,11 @@ Tab.onActivating.addListener(async (tab, info = {}) => { // return false if the
144144
}
145145
}
146146
else {
147-
shouldSkipCollapsed = true;
148147
log(' => canceled by someone.');
149148
}
150149
}
151150
info.allowed = allowed;
152-
if (!shouldSkipCollapsed)
153-
await handleNewActiveTab(tab, info);
151+
await handleNewActiveTab(tab, info);
154152
}
155153
if (shouldSkipCollapsed) {
156154
log('=> reaction for focusing collapsed descendant while Ctrl-Tab/Ctrl-Shift-Tab');

0 commit comments

Comments
 (0)