Prevent scrolling with arrow keys
This commit is contained in:
parent
0237225750
commit
66414bac8b
|
@ -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",
|
||||
|
|
|
@ -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": {
|
||||
|
|
Loading…
Reference in New Issue