prevent default on any keystroke

This commit is contained in:
marlon-erler
2026-04-14 09:41:02 +00:00
parent ce77af0094
commit 311e6770c3
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -8,7 +8,7 @@ import FileTransferModel from "../../Model/Global/fileTransferModel";
import { v4 } from "uuid";
export default class CoreViewModel {
readonly BUILD = "Build 26.04.14.B";
readonly BUILD = "Build 26.04.14.C";
translations: Translations;
@@ -40,6 +40,7 @@ export default class CoreViewModel {
handleKeyDown = (e: KeyboardEvent): void => {
if (CoreViewModel.checkIsKeystroke(e) == false) return;
e.preventDefault();
const contexts: Context[] = this.contexts;
while (contexts.length > 0) {
const currentContext: Context | undefined = contexts.pop();
@@ -89,7 +90,6 @@ export class Context {
e.key.toLowerCase(),
);
if (!fn) return false;
e.preventDefault();
fn();
return true;
};