Input fixed (event path sometimes undefined on some browsers)

This commit is contained in:
Michael Chen 2022-11-16 17:22:34 +01:00
parent 531c0e1344
commit 9c328059fe
Signed by: cnml
GPG Key ID: 5845BF3F82D5F629

View File

@ -186,7 +186,7 @@ const keyEvent = (function () {
}
if (event.repeat) return;
if (event.path.indexOf(document.body) != 0) return; // only use key if it was pressed on empty space
if (event.target.tagName == 'INPUT') return; // dont use key if on input
event.preventDefault();
moveUpdated();