to:sync
This commit is contained in:
parent
5ef7c67472
commit
ba6491650c
@ -340,6 +340,7 @@ export class MyUtils {
|
|||||||
|
|
||||||
console.log("body-frontSize: ", myEditFrontSize.style.fontSize);
|
console.log("body-frontSize: ", myEditFrontSize.style.fontSize);
|
||||||
|
|
||||||
|
if (window.myEdit.ctx.isMobile) {
|
||||||
let testDiv = document.getElementById("testDevice");
|
let testDiv = document.getElementById("testDevice");
|
||||||
var resizeHeight = document.documentElement.clientHeight || document.body.clientHeight;
|
var resizeHeight = document.documentElement.clientHeight || document.body.clientHeight;
|
||||||
if (window.myEdit.ctx.originHeight < resizeHeight) {
|
if (window.myEdit.ctx.originHeight < resizeHeight) {
|
||||||
@ -352,8 +353,22 @@ export class MyUtils {
|
|||||||
// Android 键盘收起后操作
|
// Android 键盘收起后操作
|
||||||
let styleUtils = document.getElementById("_style_utils");
|
let styleUtils = document.getElementById("_style_utils");
|
||||||
styleUtils.style.display = "none";
|
styleUtils.style.display = "none";
|
||||||
|
setTimeout(() => {
|
||||||
|
this.keyBoardHeight = window.innerHeight - window.visualViewport.height;
|
||||||
|
// console.log("mobile: ", this.keyBoardHeight);
|
||||||
|
|
||||||
|
testDiv.innerText = "\n键盘收起啦mobile: " + this.keyBoardHeight +
|
||||||
|
"\noriginHeight " + window.myEdit.ctx.originHeight +
|
||||||
|
"\nresizeHeight " + resizeHeight +
|
||||||
|
"\ninnerHeight:" + window.innerHeight +
|
||||||
|
"\nvisualViewport.height: " + window.visualViewport.height
|
||||||
|
|
||||||
|
let styleUtils = document.getElementById("_style_utils");
|
||||||
|
styleUtils.style.display = "none";
|
||||||
|
}, 800);
|
||||||
} else {
|
} else {
|
||||||
console.log('Android 键盘弹起啦!');
|
console.log('Android 键盘弹起啦!');
|
||||||
|
|
||||||
testDiv.innerText = "\nmobile: " + 'Android 键盘弹起啦!' +
|
testDiv.innerText = "\nmobile: " + 'Android 键盘弹起啦!' +
|
||||||
"\noriginHeight " + window.myEdit.ctx.originHeight +
|
"\noriginHeight " + window.myEdit.ctx.originHeight +
|
||||||
"\nresizeHeight " + resizeHeight +
|
"\nresizeHeight " + resizeHeight +
|
||||||
@ -366,24 +381,22 @@ export class MyUtils {
|
|||||||
this.keyBoardHeight = window.innerHeight - window.visualViewport.height;
|
this.keyBoardHeight = window.innerHeight - window.visualViewport.height;
|
||||||
// console.log("mobile: ", this.keyBoardHeight);
|
// console.log("mobile: ", this.keyBoardHeight);
|
||||||
|
|
||||||
testDiv.innerText = "\nmobile: " + this.keyBoardHeight +
|
testDiv.innerText = "\n键盘弹起啦mobile: " + this.keyBoardHeight +
|
||||||
"\noriginHeight " + window.myEdit.ctx.originHeight +
|
"\noriginHeight " + window.myEdit.ctx.originHeight +
|
||||||
"\nresizeHeight " + resizeHeight +
|
"\nresizeHeight " + resizeHeight +
|
||||||
"\ninnerHeight:" + window.innerHeight +
|
"\ninnerHeight:" + window.innerHeight +
|
||||||
"\nvisualViewport.height: " + window.visualViewport.height
|
"\nvisualViewport.height: " + window.visualViewport.height
|
||||||
|
// styleUtils.style.left = 0;
|
||||||
|
|
||||||
let styleUtils = document.getElementById("_style_utils");
|
let styleUtils = document.getElementById("_style_utils");
|
||||||
styleUtils.style.display = "block";
|
styleUtils.style.display = "block";
|
||||||
// styleUtils.style.left = 0;
|
styleUtils.style.bottom = "500px";
|
||||||
styleUtils.style.bottom = "600px";
|
|
||||||
}, 800);
|
}, 800);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
window.myEdit.ctx.originHeight = resizeHeight;
|
window.myEdit.ctx.originHeight = resizeHeight;
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user