Fix mobile BUG by blocking Touchstart event

Source: Internet
Author: User

Under IOS10, even user-scalable=no that have the META tag set cannot prevent users from scaling.

The workaround for this BUG is to block PC events:

function (EV) {    ev.preventdefault ();});


In addition, this method can also solve the iOS10 in the horizontal page overflow, even if the body set the Overflow:hidden still can slide the problem.

However, when this event is added, the iOS10 Rubber band effect is blocked and the text check feature is disabled.

This bug is resolved by blocking the default event for Touchstart, and also by blocking this default event to resolve the 300ms delay.

Of course, because the default behavior is blocked, the default jump page for a-label link cannot be implemented, only by manually adding events:

function (EV) {    = "www.tirion.me";});

The input box gets focus also needs to be resolved manually:

function (EV) {    ev.stoppropagation ();});

Fix mobile BUG by blocking Touchstart event

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.