Skip to content

Commit f2c6493

Browse files
committed
Ignore keyboard events in textbox role elements
This prevents them inside the Monaco editor.
1 parent 17ef53d commit f2c6493

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

webapp/public/js/domjudge.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -976,7 +976,7 @@ function initializeKeyboardShortcuts() {
976976
return;
977977
}
978978
// Check if the user is not typing in an input field.
979-
if (e.target.tagName === 'INPUT' || e.target.tagName === 'TEXTAREA') {
979+
if (e.target.tagName === 'INPUT' || e.target.tagName === 'TEXTAREA' || document.activeElement.role === 'textbox') {
980980
return;
981981
}
982982
var key = e.key.toLowerCase();

0 commit comments

Comments
 (0)