Skip to content

Commit 09a8126

Browse files
mpsijmmeisterT
authored andcommitted
Fix #2701: Do not show shortcut box when modifier key is pressed
1 parent a75c73a commit 09a8126

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

webapp/public/js/domjudge.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -834,6 +834,10 @@ function initializeKeyboardShortcuts() {
834834
if (keysCookie != 1 && keysCookie != "") {
835835
return;
836836
}
837+
// Do not trigger shortcuts if user is pressing Ctrl/Alt/Option/Meta key.
838+
if (e.altKey || e.ctrlKey || e.metaKey) {
839+
return;
840+
}
837841
// Check if the user is not typing in an input field.
838842
if (e.target.tagName === 'INPUT' || e.target.tagName === 'TEXTAREA') {
839843
return;

0 commit comments

Comments
 (0)