Topic: Firefox on click event twice in input button within accordion
Karg priority asked 1 year ago
https://mdbootstrap.com/snippets/standard/karg/5395625
Placing an within an accordion (invisible) causes in Firefox on click event twice for one click.
Expected behavior
Accordion Item #2 contains 2 buttons, one "input" and one "a". Both have a "click" event handler added which logs to console. When clicking on each of these, event should only come once per click.
Actual behavior
Test1 ("input") logs twice for one click in Firefox (but not Chrome), Test2 ("a") logs only once for both Firefox and Chrome.
Resources (screenshots, code snippets etc.)
https://mdbootstrap.com/snippets/standard/karg/5395625
Kamila Pieńkowska staff answered 1 year ago
input
will work weirdly on Firefox due to Firefox unique engine interaction with adding a ripple effect.
So I suggest using a
or button
tags if you want predictable behavior.
Kamila Pieńkowska staff answered 1 year ago
Please publish your snippet. Right now I don't have access to its content.
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Answered
- ForumUser: Priority
- Premium support: Yes
- Technology: MDB Standard
- MDB Version: MDB5 6.4.0
- Device: Desktop
- Browser: Firefox
- OS: Windows 11
- Provided sample code: No
- Provided link: Yes