forked from tools/josh
Prevent scrolling with arrow keys
This commit is contained in:
parent
0237225750
commit
66414bac8b
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "fwdekker.com",
|
"name": "fwdekker.com",
|
||||||
"version": "0.40.2",
|
"version": "0.40.3",
|
||||||
"description": "The source code of [my personal website](https://fwdekker.com/).",
|
"description": "The source code of [my personal website](https://fwdekker.com/).",
|
||||||
"author": "Felix W. Dekker",
|
"author": "Felix W. Dekker",
|
||||||
"browser": "dist/bundle.js",
|
"browser": "dist/bundle.js",
|
||||||
|
|
|
@ -310,6 +310,8 @@ export class Terminal {
|
||||||
const inputChild = this.input.firstChild;
|
const inputChild = this.input.firstChild;
|
||||||
if (inputChild !== null)
|
if (inputChild !== null)
|
||||||
setTimeout(() => moveCaretToEndOf(inputChild), 0);
|
setTimeout(() => moveCaretToEndOf(inputChild), 0);
|
||||||
|
|
||||||
|
event.preventDefault();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case "arrowdown": {
|
case "arrowdown": {
|
||||||
|
@ -319,6 +321,8 @@ export class Terminal {
|
||||||
const inputChild = this.input.firstChild;
|
const inputChild = this.input.firstChild;
|
||||||
if (inputChild !== null)
|
if (inputChild !== null)
|
||||||
setTimeout(() => moveCaretToEndOf(inputChild), 0);
|
setTimeout(() => moveCaretToEndOf(inputChild), 0);
|
||||||
|
|
||||||
|
event.preventDefault();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case "tab": {
|
case "tab": {
|
||||||
|
|
Loading…
Reference in New Issue