mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-11-10 06:01:28 +08:00
impr(typing): preventing arrow navigation and text selection of the test input
closes #4671
This commit is contained in:
parent
7599cbb82e
commit
12e83c53f4
2 changed files with 11 additions and 0 deletions
|
|
@ -478,6 +478,7 @@
|
|||
z-index: -1;
|
||||
cursor: default;
|
||||
pointer-events: none;
|
||||
user-select: none !important;
|
||||
}
|
||||
|
||||
#capsWarning {
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue