Skip to content

Conversation

@jum-odoo
Copy link

@jum-odoo jum-odoo commented Nov 13, 2025

This commit fixes 2 behaviors regarding synthetic events:

  • "non-bubbling" events (such as 'mouseenter', 'focus', etc.) are not allowed anymore as synthetic events, since this would not work either way;

  • instead of an internal global variable to keep track of what events have already been registered with synthetic event handlers, special keys are now assigned on the document object. This has been done to avoid duplicate listeners when multiple instances of Owl are spawned.

Fixes #1284

This commit fixes 2 behaviors regarding synthetic events:

- "non-bubbling" events (such as 'mouseenter', 'focus', etc.) are not
allowed anymore as synthetic events, since this would not work either
way;

- instead of an internal global variable to keep track of what events
have already been registered with synthetic event handlers, special keys
are now assigned on the document object. This has been done to avoid
duplicate listeners when multiple instances of Owl are spawned.

Fixes #1284
@jum-odoo jum-odoo force-pushed the master-fix-synthetic-events-jum branch from 58ee0e6 to 509e203 Compare November 13, 2025 13:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[nice to have] Synthetic event handlers should not be allowed on events that cannot bubble

1 participant