Commit Graph

2 Commits

Author SHA1 Message Date
Masen Furer
bf20a530df
Do not stop prop is there is no prop to stop (#2116)
Check that desired event actions are defined on the object passed as the DOM
event before calling them to avoid frontend errors.
2023-11-02 10:21:41 -07:00
Masen Furer
56476d0a86
Expose DOM event actions on EventHandler, EventSpec, and EventChain (stopPropagation) (#1891)
* Expose preventDefault and stopPropagation for DOM events

All EventHandler, EventSpec, and EventChain can now carry these extra
"event_actions" that will be applied inside the frontend code when an event is
triggered from the DOM.

Fix #1621
Fix REF-675

* Test cases (and fixes) for "event_actions"

* form: from __future__ import annotations

for py38, py39 compat

* Revert overzealous merge conflict resolution
2023-10-31 11:42:42 -07:00