[LayaAir 2.0]2.0版本 ios浏览器旋转,会导致适配出现问题,无法旋转回来

ios问题:
1、首次打开好的,转一下手机浏览器就坏了,再转回来,还是这样
    补充说明:微信浏览器和qq浏览器
2、ios微信情况下,textarea  点击完成软键盘,页面没有返回到 scrollTop =0
 
安卓问题:
1、安卓微信浏览器和qq浏览器,textarea  点击后,键盘不会上浮,必须打字后才会同步窗口进行上浮。
 

QQ截图20190314124002.png

无法自动旋转
 

安卓输入.gif

安卓输入法不向上
 

ios输入.gif

ios输入法不会向下
 
微信小程序 手机上,密码输入框 空白 没有星星。
 
QQ截图20190313150102.png
已邀请:

zjkynu

赞同来自:

ios下的微信浏览器、qq浏览器,旋转时,遇到同样问题,官方可否解答一下

Aar0n

赞同来自:

先用题主的临时替代方案
 
var windowInnerWidth=false;
var windowOnWidth=true;
var isIos=true;
window.top.onresize = function () {
var u = navigator.userAgent;
if (u.indexOf('Android') > -1 || u.indexOf('Linux') > -1) {
isIos=false;
}else if(!!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/)){
isIos=true;
}
var windowWidth=true;
if(window.document.body.clientWidth>document.body.clientHeight){
windowWidth=false;
}
 
if(windowInnerWidth==false&&windowOnWidth!=windowWidth){
window.location.reload();
}
 
}
 
 
//class game.Game
var yfqian=(function(){
function yfqian(){
var debug=yfqian.getUrl("debug");
console.log("dubegs:",debug);
if(debug=="yfqian"){
new VConsole();
webUrl=testUrl;
phpUrl=testUrl_php;
}else{
webUrl=adminUrl;
phpUrl=adminUrl_php;
}
window.console.log('webUrl:',webUrl)
if(window.document.body.clientWidth>document.body.clientHeight){
windowOnWidth=false;
}
if ((/Android/gi).test(navigator.userAgent)) {
window.addEventListener('resize', function () {
if (document.activeElement.tagName == 'INPUT' || 
document.activeElement.tagName == 'TEXTAREA') {
window.setTimeout(function () {
document.activeElement.scrollIntoViewIfNeeded();
}, 0);
}
});

$(document).on('focusout', function () {//软键盘收起的事件处理
windowInnerWidth=false;
document.body.scrollTop = document.documentElement.scrollTop = 0;
});
 
$(document).on('focusin', function () {//软键盘弹出的事件处理
windowInnerWidth=true;
});
 
// alert(4);
}
// var __proto=yfqian.prototype;
// __class(yfqian,'yfqian_script');
yfqian.getUrl=function(name){
var reg = new RegExp("(^|\\?|&)"+ name +"=([^&]*)(\\s|&|$)", "i");
if (reg.test(location.href)) return unescape(RegExp.$2.replace(/\+/g, " "));
return "";
}
return yfqian;
})();
new yfqian();

要回复问题请先

商务合作
商务合作