Firefox on click event twice in input button within accordio


Topic: Firefox on click event twice in input button within accordion

Karg pro premium priority asked a 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


kpienkowska staff answered a year ago

Please publish your snippet. Right now I don't have access to its content.


Karg pro premium priority commented a year ago

Sorry, now published.


kpienkowska staff answered a 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.


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
  • User: Pro
  • 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