impr(typing): preventing arrow navigation and text selection of the test input

closes #4671
This commit is contained in:
Miodec 2023-09-26 14:18:34 +01:00
parent 7599cbb82e
commit 12e83c53f4
2 changed files with 11 additions and 0 deletions

View file

@ -478,6 +478,7 @@
z-index: -1;
cursor: default;
pointer-events: none;
user-select: none !important;
}
#capsWarning {

View file

@ -1268,6 +1268,16 @@ $("#wordsInput").on("copy paste", (event) => {
event.preventDefault();
});
$("#wordsInput").on("select selectstart", (event) => {
event.preventDefault();
});
$("#wordsInput").on("keydown", (event) => {
if (event.key.startsWith("Arrow")) {
event.preventDefault();
}
});
// Composing events
$("#wordsInput").on("compositionstart", () => {
if (Config.layout !== "default") return;