aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/lib/scripts/linkwiz.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/scripts/linkwiz.js')
-rw-r--r--lib/scripts/linkwiz.js10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/scripts/linkwiz.js b/lib/scripts/linkwiz.js
index 494a60b15..a78c8c52c 100644
--- a/lib/scripts/linkwiz.js
+++ b/lib/scripts/linkwiz.js
@@ -67,28 +67,28 @@ class LinkWizard {
* Handle all keyup events in the entry field
*/
onEntry(e) {
- if (e.keyCode == 37 || e.keyCode == 39) { //left/right
+ if (e.key === 'ArrowLeft' || e.key === 'ArrowRight') { //left/right
return true; //ignore
}
- if (e.keyCode == 27) { //Escape
+ if (e.key === 'Escape') { //Escape
this.hide();
e.preventDefault();
e.stopPropagation();
return false;
}
- if (e.keyCode == 38) { //Up
+ if (e.key === 'ArrowUp') { //Up
this.select(this.selected - 1);
e.preventDefault();
e.stopPropagation();
return false;
}
- if (e.keyCode == 40) { //Down
+ if (e.key === 'ArrowDown') { //Down
this.select(this.selected + 1);
e.preventDefault();
e.stopPropagation();
return false;
}
- if (e.keyCode == 13) { //Enter
+ if (e.key === 'Enter') { //Enter
if (this.selected > -1) {
const $obj = this.$getResult(this.selected);
if ($obj.length > 0) {