forked from tools/josh
1
0
Fork 0

Prevent scrolling with arrow keys

This commit is contained in:
Florine W. Dekker 2021-04-23 00:34:11 +02:00
parent 0237225750
commit 66414bac8b
Signed by: FWDekker
GPG Key ID: B1B567AF58D6EE0F
2 changed files with 5 additions and 1 deletions

View File

@ -1,6 +1,6 @@
{
"name": "fwdekker.com",
"version": "0.40.2",
"version": "0.40.3",
"description": "The source code of [my personal website](https://fwdekker.com/).",
"author": "Felix W. Dekker",
"browser": "dist/bundle.js",

View File

@ -310,6 +310,8 @@ export class Terminal {
const inputChild = this.input.firstChild;
if (inputChild !== null)
setTimeout(() => moveCaretToEndOf(inputChild), 0);
event.preventDefault();
break;
}
case "arrowdown": {
@ -319,6 +321,8 @@ export class Terminal {
const inputChild = this.input.firstChild;
if (inputChild !== null)
setTimeout(() => moveCaretToEndOf(inputChild), 0);
event.preventDefault();
break;
}
case "tab": {