H5 page of the product almost all use the Iscroll plug-in, if a tag in the Iscroll, in some mobile browsers, there will be no click, whether binding the Click event or using the A-tag href attribute. The href attribute is occasionally clickable, and the Click event is completely not available.
If you replace a with a button or input, you can respond to the click event.
If you are using a built-in browser, you can respond to the Click event (except Nubia). QQ Browser can also respond.
This is the problem with the phone's local browser, iscroll,a tags are related.
Iscroll uses various techniques to scroll based on device/browser capability. normally you don ' t need to configure the engine, Iscroll are smart enough to pick the best for you.
Don't be happy too soon.
Nonetheless it is important to understand which mechanisms iscroll works on and how to configure them.
There are too many options, just look at the focus, click and tap
To override the native scrolling iscroll have to inhibit some default browser behaviors, such as mouse clicks. If you want your application to respond to the click Event, you have a to explicitly set of this option to true
. Please note that it's suggested to use the custom tap
event instead (see below).
The point is here, Iscroll blocked the browser's default behavior, such as Click. Setting the Click to True is OK. Don't ask me why I blocked the default click, some mobile browser can be, some can not, this I do not know. - -。
If you only set Click to True, a partial a or no click will appear, plus taps:true;
Set this-to-let true
iscroll emit a custom event when the scroll area is clicked/tapped and not tap
scrolled.
Thanks to the Almighty StackOverflow,
Click event in Iscroll under Mobile browser