尝试过失焦页面回滚 但是没用
ios的bug。blur的时候 setTimeOut设置一下scrollTop为0就行
### $('input,textarea').on('blur',function(){
let u = navigator.userAgent;
let isiOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/); //ios终端
var y = window.pageYOffset || document.documentElement.scrollTop || document.body
.scrollTop || $(document).scrollTop() || 0; //兼容
console.log(y);
if(isiOS){
console.log('ios判断');
parent.$('#info iframe').contents().scrollTop(0)
parent.scroll(0,0)
}
});
});
之前设置滚动无效是因为我使用了iframe弹窗,正确找到iframe的window对象问题解决