mdbootstrap / mdb-react-ui-kit

React 18 & Bootstrap 5 & Material Design 2.0 UI KIT
https://mdbootstrap.com/docs/b5/react/
Other
1.41k stars 264 forks source link

Duplicated onClick event handler on Button #18

Closed shilu911 closed 6 years ago

shilu911 commented 6 years ago

If I pass an onClick attribute to the Button component as a prop, then there will be 2 onClick attributes on the button element(line 80 and line 83 of Button.js)

JStrebeyko commented 6 years ago

Yes, it's true. What feedback are you getting from the compilation terminal / console?

shilu911 commented 6 years ago

On Chrome, it works fine, but on Safari it needs double click to trigger the onClick event handler I pass to the the Button component, because the first click trigger the wave animation but not trigger the onClick event handler, I must click the button again quickly before the animation is finished then I am able to trigger the onClick event handler.

JStrebeyko commented 6 years ago

Has been noted. Contributions are welcome!

JStrebeyko commented 6 years ago

Hi, just dropping by to let people now, that issue is widely known and it has known workarounds. We encourage commits solving this problem, even though browsers are moving away from the said iOS 300ms delay causing it.