Event background:
Recently when doing a mobile business encounter a bug, on iOS on the body binding click Thing Implementation Event Agent bubbling to some elements on altogether does not take effect.
Thinking:
Using jquery to show the event binding code, all tags containing the data-tip attribute are proxied to the body through the event
$ (' body '). On (' click ', ' [Data-tip] ',function(e) { console.log ($). attr (' Data-tip ')) })
This can be done on both Android and PC, but it does not work on some of the tags altogether on iOS. such as TR, span ... Such a label
Workaround:
1. Switch the Click event to the touch event while also addressing the 300ms click Latency issue, but it is cumbersome to e.stoppropagation () to prevent bubbling processing.
2. Perform an event binding on an element that does not normally bubble, such as a TR can perform an event proxy on <table> again.
3. The simplest way to add a Cursor:pointer property to a CSS property of an element that does not normally bubble.
4. Change to a label that can bubble normally.
Body binding on iOS device Click event does not take effect and its solution