to:sync
This commit is contained in:
parent
cd10df9ad9
commit
5ef7c67472
@ -340,12 +340,50 @@ export class MyUtils {
|
|||||||
|
|
||||||
console.log("body-frontSize: ", myEditFrontSize.style.fontSize);
|
console.log("body-frontSize: ", myEditFrontSize.style.fontSize);
|
||||||
|
|
||||||
setTimeout(() => {
|
let testDiv = document.getElementById("testDevice");
|
||||||
this.keyBoardHeight = window.innerHeight - window.visualViewport.height;
|
var resizeHeight = document.documentElement.clientHeight || document.body.clientHeight;
|
||||||
// console.log("mobile: ", this.keyBoardHeight);
|
if (window.myEdit.ctx.originHeight < resizeHeight) {
|
||||||
let testDiv = document.getElementById("testDevice");
|
console.log('Android 键盘收起啦!');
|
||||||
testDiv.innerText = "\nmobile: " + this.keyBoardHeight
|
testDiv.innerText = "\nmobile: " + 'Android 键盘收起啦!' +
|
||||||
}, 800);
|
"\noriginHeight " + window.myEdit.ctx.originHeight +
|
||||||
|
"\nresizeHeight:" + resizeHeight +
|
||||||
|
"\ninnerHeight:" + window.innerHeight +
|
||||||
|
"\nvisualViewport.height: " + window.visualViewport.height
|
||||||
|
// Android 键盘收起后操作
|
||||||
|
let styleUtils = document.getElementById("_style_utils");
|
||||||
|
styleUtils.style.display = "none";
|
||||||
|
} else {
|
||||||
|
console.log('Android 键盘弹起啦!');
|
||||||
|
testDiv.innerText = "\nmobile: " + 'Android 键盘弹起啦!' +
|
||||||
|
"\noriginHeight " + window.myEdit.ctx.originHeight +
|
||||||
|
"\nresizeHeight " + resizeHeight +
|
||||||
|
"\ninnerHeight:" + window.innerHeight +
|
||||||
|
"\nvisualViewport.height: " + window.visualViewport.height
|
||||||
|
|
||||||
|
|
||||||
|
// Android 键盘弹起后操作
|
||||||
|
setTimeout(() => {
|
||||||
|
this.keyBoardHeight = window.innerHeight - window.visualViewport.height;
|
||||||
|
// console.log("mobile: ", this.keyBoardHeight);
|
||||||
|
|
||||||
|
testDiv.innerText = "\nmobile: " + 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 = "block";
|
||||||
|
// styleUtils.style.left = 0;
|
||||||
|
styleUtils.style.bottom = "600px";
|
||||||
|
}, 800);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
window.myEdit.ctx.originHeight = resizeHeight;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -150,8 +150,10 @@ export class MyEventListener {
|
|||||||
MouseUpOrTouchend(e) {
|
MouseUpOrTouchend(e) {
|
||||||
let styleUtils = document.getElementById("_style_utils");
|
let styleUtils = document.getElementById("_style_utils");
|
||||||
if (window.myEdit.utils.GetSelection().isCollapsed) {
|
if (window.myEdit.utils.GetSelection().isCollapsed) {
|
||||||
console.log("none")
|
// console.log("none")
|
||||||
styleUtils.style.display = "none";
|
if (!window.myEdit.ctx.isMobile) {
|
||||||
|
styleUtils.style.display = "none";
|
||||||
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -182,12 +182,6 @@ window.onload = function () {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
setTimeout(() => {
|
|
||||||
this.keyBoardHeight = window.innerHeight - window.visualViewport.height;
|
|
||||||
// console.log("mobile: ", this.keyBoardHeight);
|
|
||||||
let testDiv = document.getElementById("testDevice");
|
|
||||||
testDiv.innerText = "\nmobile: " + this.keyBoardHeight
|
|
||||||
}, 800);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user