What is the principle mobile terminal click event delay trigger is? how to solve this problem?

What is the principle mobile terminal click event delay trigger is? how to solve this problem?

  • Principle: Double-click on the mobile side of the screen will zoom the page 300ms delay
  • There will be points through phenomenon
    created on a popup layer list page, pop-up layer has a close button, you point the button to close the pop-up layer, because there is 300ms delay, so the content being below the button will execute the click event (or open the link). This is defined as it is a "point of penetration" phenomenon
  • solution
    • Viewport label ban users zoom

      <meta name="viewport" content="width=device-width, initial-scale=1.0,user-scalable=no">         
    • Event package using the touch event to lift 300ms delay
    • Use plug-in plug-ins to solve the 300ms delay fastclick
      official website: https://github.com/ftlabs/fastclick lib file ---- fastclick

Guess you like

Origin www.cnblogs.com/zcsmile/p/10962018.html