ios在微信中目前遇见的bug
1.ios在微信浏览器中不能获取文本域的焦点
将有这几个属性删除即可
* {-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;
}
input {-webkit-user-select:auto; /*webkit浏览器*/
}
2.ios在微信浏览器中不能自动播放音乐
解决办法:
1.可以监听触碰事件,让他触碰屏幕抬起时播放音乐
2.在created中获取dom节点,让其播放
3.ios在微信浏览器中调取软键盘然后留白
转自:https://www.jianshu.com/p/175f0c419ab1
$("input").blur(function(){setTimeout(() => {const scrollHeight = document.documentElement.scrollTop || document.body.scrollTop ||0;window.scrollTo(0, Math.max(scrollHeight -1, 0));}, 100);})
4 .只能保留一屏,不能滑动页面**
#app {
/* font-family: “Avenir”, Helvetica, Arial, sans-serif; */
text-align: center;
overflow-y: scroll;
height: 100vh;
-webkit-overflow-scrolling: touch;
}