Missing click event for inside <button> element on firefox

后端 未结 4 1724
日久生厌
日久生厌 2020-11-28 15:41

I am experiencing problem with Firefox 32 when I bind action on click event of span element inside a button element. Other browsers seems to works well.

Here the cod

4条回答
  •  无人及你
    2020-11-28 16:16

    As far as i known clicking the children elements won't work because it is nested inside a button. A button is not container for child elements - only for text.

    If you try like below it always tell that you clicked the button.

    So, my suggestion is to use another span or a div

    inside a div **working**

    Hope it helps...

    Note: Your code will work in chrome but not in firefox and my answer is alternative solution for making work in firefox

提交回复
热议问题