Skip to content

fix: ignore bubbled transitionend when emulating transition end - #206

Open
BDanyil wants to merge 1 commit into
react-bootstrap:masterfrom
BDanyil:fix-transition-end-child-bubbling
Open

fix: ignore bubbled transitionend when emulating transition end#206
BDanyil wants to merge 1 commit into
react-bootstrap:masterfrom
BDanyil:fix-transition-end-child-bubbling

Conversation

@BDanyil

@BDanyil BDanyil commented Sep 4, 2026

Copy link
Copy Markdown

Fixes #184

A transitionend bubbling from a child node sets called = true, which cancels the fallback timer. react-bootstrap's transitionEndListener ignores events whose target isn't the element, so when the element itself never fires (e.g. Bootstrap's transition: none under prefers-reduced-motion) the transition never completes and modals get stuck open. See react-bootstrap/react-bootstrap#6153

Only count the event as seen when it was fired on the element itself

Added a test that fires a bubbling transitionend from a child and checks the emulated event still arrives. Fails on master, passes with the change

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.

transitionEnd() doesn't work as expected if event fires on child node but not node itself

1 participant