Reproduction example: StackBlitz.
It appears that certain essential logic in the modal relies on the animationend event. However, this dependency is unreliable—especially since animation-related code seems to assume animationend will always fire, which isn't guaranteed in all environments or scenarios.
For robustness, the implementation should also account for animationcancel and handle cases where animations fail or are disabled (e.g., due to user preferences like prefers-reduced-motion).
As a result of this issue, the afterOpen and afterClose callbacks do not fire as expected, breaking downstream functionality that depends on them.
Reproduction example: StackBlitz.
It appears that certain essential logic in the modal relies on the
animationendevent. However, this dependency is unreliable—especially since animation-related code seems to assumeanimationendwill always fire, which isn't guaranteed in all environments or scenarios.For robustness, the implementation should also account for
animationcanceland handle cases where animations fail or are disabled (e.g., due to user preferences likeprefers-reduced-motion).As a result of this issue, the
afterOpenandafterClosecallbacks do not fire as expected, breaking downstream functionality that depends on them.