button firing click event twice

后端 未结 14 2064
忘了有多久
忘了有多久 2021-02-07 21:28

It seems that sometimes (but not always) my button click event is being fired twice. The fact that it seems to happen sometimes but not always is really puzzling me. Here is m

14条回答
  •  有刺的猬
    2021-02-07 22:08

    I had the same problem, and it took me a while to figure it out! If you add type="button" to your button, it seems to fix the issue.

提交回复
热议问题