Topic: Alert hidden event does not fire without animations

codepilot77 free asked 2 weeks ago


I refresh a notification counter after an alert closes. Under reduced motion, the callback never runs.

Should the hidden event still fire when no CSS transition occurs?


Igor Przybysz staff answered 2 weeks ago


hidden.mdb.alert describes a completed hide operation, so application logic should not have to listen for a native transitionend event instead. First attach the MDB event listener to the same alert element before triggering the hide operation, and check whether the alert actually becomes hidden or the entire operation stops.

Please provide a small reproduction with your listener, dismissal code, and reduced-motion CSS. Also indicate whether you use hide() or a dismiss/close action. For the counter, keep its underlying data update separate from animation completion where possible; that prevents a visual lifecycle issue from leaving application data stale.

https://mdbootstrap.com/docs/standard/components/alerts/



Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Answered

Specification of the issue

  • ForumUser: Free
  • Premium support: No
  • Technology: MDB Standard
  • MDB Version: MDB5 8.1.0
  • Device: Desktop
  • Browser: Edge
  • OS: Windows 11
  • Provided sample code: No
  • Provided link: No