Summary of solutions to IOS common problems (1)


1. Click input on ios10 and the screen will turn white

-moz-transform: translateZ(0);

-ms-transform: translateZ(0);

-o-transform: translateZ(0);

Transform: translatez (0); / * solves the problem that the input box will turn white instantly after adding JS*/

2. IPhone 11 input scrolling focus follows

Remove line height

3. The page below is covered with white when the iPhone is pulled up

Remove app overflow: scroll

4. When the input in the pop-up window of Apple mobile phone loses focus, the page moves up

< input type = “password” class = “passinput” V-model = “password” placeholder = “please enter password” @ blur = “coverscroll” >

//The screen moves up when Apple gets focus


     window.scroll(0, 0);


5. The drop-down of IOS pull-up border appears blank

In IOS, the touch move event is triggered by holding the finger down and up the screen. The object triggered by this event is the entire WebView container. The container will naturally be dragged and the rest will be blank.

document.body.addEventListener( ‘touchmove’, function(e) {

if (e._ Isscroller) return / / block the default event e.preventdefault ()

}, {

passive: false

} )