Skip to content

Commit

Permalink
Don't show tree specific sub menu for multiselection
Browse files Browse the repository at this point in the history
  • Loading branch information
piroor committed Nov 9, 2023
1 parent f924849 commit ab55e11
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions background/context-menu.js
Original file line number Diff line number Diff line change
Expand Up @@ -347,13 +347,14 @@ async function onShown(info, tab) {
const context = new Context({ tab });
await context.resolve();

const chooseFromMenu = (context.isTreeParent ? configs.modeForNoSelectionTree : configs.modeForNoSelection) == Constants.kCOPY_CHOOSE_FROM_MENU;
const multiselected = context.multiselectedTabs.length > 1;
const chooseFromMenu = (!multiselected && context.isTreeParent ? configs.modeForNoSelectionTree : configs.modeForNoSelection) == Constants.kCOPY_CHOOSE_FROM_MENU;
log('onShown ', {
chooseFromMenu,
isTreeParent: context.isTreeParent,
multiselected: context.multiselectedTabs.length > 1,
multiselected,
});
const titleKey = (context.multiselectedTabs.length > 1 || chooseFromMenu) ?
const titleKey = (multiselected || chooseFromMenu) ?
'context_copyTabs_label' :
context.shouldCopyAll ? 'context_copyAllTabs_label' :
context.shouldCopyOnlyDescendants ? 'context_copyTreeDescendants_label' :
Expand Down

0 comments on commit ab55e11

Please sign in to comment.