Skip to content

Commit

Permalink
hotfix crbug.com/1523183
Browse files Browse the repository at this point in the history
  • Loading branch information
keithamus committed Jan 30, 2024
1 parent c6a9169 commit eecbd5d
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions invoker.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,15 @@
return;
}

// XXX: https://bugs.chromium.org/p/chromium/issues/detail?id=1523183
// Chrome will dispatch invoke events even with the flag disabled; so
// we need to capture those to prevent duplicate events.
document.addEventListener('invoke', (e) => {
if (e.type == 'invoke' && e.isTrusted) {
e.stopImmediatePropagation();
}
}, true);

function makeEnumerable(obj, key) {
Object.defineProperty(obj, key, {
...Object.getOwnPropertyDescriptor(obj, key),
Expand Down

0 comments on commit eecbd5d

Please sign in to comment.