aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/lib/scripts
diff options
context:
space:
mode:
authorAndreas Gohr <andi@splitbrain.org>2024-10-14 12:52:57 +0200
committerAndreas Gohr <andi@splitbrain.org>2024-10-14 12:52:57 +0200
commit3f677f5c17910f6da763ff741753e2a60300b257 (patch)
treeb125e3b3132a9e5d275ac3ce5cb39778390e57a7 /lib/scripts
parentdf4e0c232991db87e25fcfb8c3c537c685c54df7 (diff)
downloaddokuwiki-3f677f5c17910f6da763ff741753e2a60300b257.tar.gz
dokuwiki-3f677f5c17910f6da763ff741753e2a60300b257.zip
LinkWizard: don't use the deprecated keycode property anymore
Diffstat (limited to 'lib/scripts')
-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) {