Skip to content

Commit

Permalink
Stop switching tabs in user view if Alt key is pressed
Browse files Browse the repository at this point in the history
Alt + ← / Alt + → is usually the shortcut for going back / forward.
  • Loading branch information
FestplattenSchnitzel committed Oct 2, 2024
1 parent 2c06494 commit 1940cc7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion web/resources/js/user-suite.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

function handleKeyPress(event: KeyboardEvent) {
// Dismiss event in case it was triggered in a text area or the shift key was (already) pressed
if (event.target instanceof HTMLInputElement || event.target instanceof HTMLTextAreaElement || event.shiftKey) return;
if (event.target instanceof HTMLInputElement || event.target instanceof HTMLTextAreaElement || event.altKey || event.shiftKey) return;

if (!(event.key === "ArrowRight" || event.key === "ArrowLeft")) return;

Expand Down

0 comments on commit 1940cc7

Please sign in to comment.