script widget: sometimes e.preventDefault is not defined

This commit is contained in:
jean-emmanuel 2025-02-22 10:05:10 +01:00
parent c554a23c99
commit dd8da47085

View file

@ -91,7 +91,7 @@ class ScriptWidget extends Widget {
if (e.type === 'keydown' && !this.getProp('keyRepeat')) e.preventRepeat()
e.preventDefault()
if (e.preventDefault) e.preventDefault()
this.scripts.onKeyboard.run({
type: e.type,