Fixed error being logged in the console on scriptless pages when hitting [Delete] or [Backspace] (thanks barbaz for reporting).

This commit is contained in:
hackademix 2022-12-17 20:18:14 +01:00
parent 74c8e14cc3
commit ee876f67c8
No known key found for this signature in database
GPG Key ID: 231A83AFDA9C2434
1 changed files with 1 additions and 1 deletions

View File

@ -60,7 +60,7 @@ function onScriptDisabled() {
addEventListener("keyup", ev => {
if (!ev.isTrusted) return;
let el = eraser.tapped;
if (el && ev.code === "Delete" || ev.code === "Backspace") {
if (el && (ev.code === "Delete" || ev.code === "Backspace")) {
eraser.tapped = null;
eraser.delKey = true;
let doc = el.ownerDocument;