prevent default on any keystroke
This commit is contained in:
Vendored
+1
-1
@@ -2271,6 +2271,7 @@
|
|||||||
};
|
};
|
||||||
this.handleKeyDown = (e) => {
|
this.handleKeyDown = (e) => {
|
||||||
if (_CoreViewModel.checkIsKeystroke(e) == false) return;
|
if (_CoreViewModel.checkIsKeystroke(e) == false) return;
|
||||||
|
e.preventDefault();
|
||||||
const contexts = this.contexts;
|
const contexts = this.contexts;
|
||||||
while (contexts.length > 0) {
|
while (contexts.length > 0) {
|
||||||
const currentContext = contexts.pop();
|
const currentContext = contexts.pop();
|
||||||
@@ -2314,7 +2315,6 @@
|
|||||||
e.key.toLowerCase()
|
e.key.toLowerCase()
|
||||||
);
|
);
|
||||||
if (!fn) return false;
|
if (!fn) return false;
|
||||||
e.preventDefault();
|
|
||||||
fn();
|
fn();
|
||||||
return true;
|
return true;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import FileTransferModel from "../../Model/Global/fileTransferModel";
|
|||||||
import { v4 } from "uuid";
|
import { v4 } from "uuid";
|
||||||
|
|
||||||
export default class CoreViewModel {
|
export default class CoreViewModel {
|
||||||
readonly BUILD = "Build 26.04.14.B";
|
readonly BUILD = "Build 26.04.14.C";
|
||||||
|
|
||||||
translations: Translations;
|
translations: Translations;
|
||||||
|
|
||||||
@@ -40,6 +40,7 @@ export default class CoreViewModel {
|
|||||||
|
|
||||||
handleKeyDown = (e: KeyboardEvent): void => {
|
handleKeyDown = (e: KeyboardEvent): void => {
|
||||||
if (CoreViewModel.checkIsKeystroke(e) == false) return;
|
if (CoreViewModel.checkIsKeystroke(e) == false) return;
|
||||||
|
e.preventDefault();
|
||||||
const contexts: Context[] = this.contexts;
|
const contexts: Context[] = this.contexts;
|
||||||
while (contexts.length > 0) {
|
while (contexts.length > 0) {
|
||||||
const currentContext: Context | undefined = contexts.pop();
|
const currentContext: Context | undefined = contexts.pop();
|
||||||
@@ -89,7 +90,6 @@ export class Context {
|
|||||||
e.key.toLowerCase(),
|
e.key.toLowerCase(),
|
||||||
);
|
);
|
||||||
if (!fn) return false;
|
if (!fn) return false;
|
||||||
e.preventDefault();
|
|
||||||
fn();
|
fn();
|
||||||
return true;
|
return true;
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user