Skip to content

Commit

Permalink
Merge pull request #2587 from dannycolin/issue2553-shortcut-preventde…
Browse files Browse the repository at this point in the history
…fault

Revert monitoring modifier in popup shortcuts
  • Loading branch information
dannycolin committed Nov 20, 2023
2 parents 59e951e + 6a9afcf commit 6573123
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions src/js/popup.js
Original file line number Diff line number Diff line change
Expand Up @@ -420,16 +420,7 @@ const Logic = {
isSearchInputFocused = true;
}

// We also monitor if a modifier key is pressed simultaneously with a digit
// between 0-9 to avoid conflicts with Firefox or other addons.
let isModifierPressed = false;

if (e.altKey || e.shiftKey || e.ctrlKey || e.metaKey) {
isModifierPressed = true;
e.preventDefault();
}

if (Logic._currentPanel === "containersList" && !isModifierPressed && !isSearchInputFocused) {
if (Logic._currentPanel === "containersList" && !isSearchInputFocused) {
switch(e.code) {
case "Digit0":
case "Digit1":
Expand Down

0 comments on commit 6573123

Please sign in to comment.