diff --git a/UI/Input/TextField.ts b/UI/Input/TextField.ts index 9b82ce31cc..b612f6b692 100644 --- a/UI/Input/TextField.ts +++ b/UI/Input/TextField.ts @@ -130,7 +130,7 @@ export class TextField extends InputElement { self.enterPressed.setData(field.value); } }); - + } public SetCursorPosition(i: number) { diff --git a/index.ts b/index.ts index 8ae565b8ce..4ae2a56884 100644 --- a/index.ts +++ b/index.ts @@ -143,6 +143,12 @@ if (layoutFromBase64.startsWith("http")) { .SetStyle("pointer-events: all;") .AttachTo("topleft-tools"); } +// Remove all context event listeners on mobile to prevent long presses window.addEventListener('contextmenu', (e) => { // Not compatible with IE < 9 + + if(e.target["nodeName"] === "INPUT"){ + return; + } e.preventDefault(); + return false; }, false);