There is no mouse input on the mobile device, and some mouse events, such as hover, are no longer in effect and are replaced by touch event touch
The Click event response on the mobile Web page is slower 300ms
How does 300ms delay break?
Replace the Click event with a tap event
Tap events generally refer to the Move frame library Zepto.js
Tap BUG: If a BTN has a mask on it, clicking on the mask will not only trigger the Click event on the mask, but also the Click event on the BTN.
Click event and tap event triggering process
Touch event:
Touch is the core event of mobile device interaction
Touchstart: Finger touch screen trigger (the finger is already on the screen and will not be triggered)
Touchmove: Swipe the finger on the screen to trigger continuously
Touchend: Triggers when the finger leaves the screen
Touchcancel: Triggered when the system cancels touch (not commonly used)
Touch events contain proprietary touch properties in addition to common event properties
Touches: An array of touch objects that track touches
Targettouches: An array of touch objects for a specific event target
Changetouches: An array of touch objects that last touched the change
Bug of Touch event:
Elastic scrolling: When the client's page scrolls to the top or bottom, the scroll bar shrinks and lets us scroll a certain distance. Gives the user a good experience by buffering the bounce effect
Mobile Web pages also have this ability, but there are several things to consider in scrolling,
Body Layer Scrolling: (System special Processing)
Self-Elastic scrolling: Overflow:hidden (fail), GIF and timer paused
Partial scrolling: No elastic scrolling, no rolling inertia, no flow
Partial scrolling turns on elastic scrolling:
body{ Overflow:scroll; -webkit-overflow-scrolling:touch;
Note: Android does not support native elastic scrolling! But you can use third-party library Iscroll to implement
Drop-down refresh: The top drop down a little bit away from the page elastic scrolling down
Pull-up loading
Use the scroll event instead of the touch event (Android has Bugs)
Common Bug Solutions:
Mobile Web Terminal Interactive optimization