Skip to content

Commit 1503f23

Browse files
committed
ensure CommandEvent is cancelable
1 parent a27418e commit 1503f23

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

invoker.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -307,9 +307,11 @@ export function apply() {
307307
const invokeEvent = new CommandEvent("command", {
308308
command: source.command,
309309
source,
310+
cancelable: true,
310311
});
311312
invokee.dispatchEvent(invokeEvent);
312-
if (invokeEvent.defaultPrevented) return;
313+
if (invokeEvent.defaultPrevented)
314+
return;
313315

314316
const command = invokeEvent.command.toLowerCase();
315317

0 commit comments

Comments
 (0)