|
@@ -204,19 +204,34 @@ const syncSceneStore = () => {
|
|
|
{ deep: true }
|
|
|
);
|
|
|
};
|
|
|
-
|
|
|
-if (global.android) {
|
|
|
- document.documentElement.addEventListener('focusin', ev => {
|
|
|
- console.log("获得焦点")
|
|
|
- console.log(ev.target)
|
|
|
- global.android.inputMethodManager(true);
|
|
|
- })
|
|
|
- document.documentElement.addEventListener('focusout', ev => {
|
|
|
- console.log("失去焦点")
|
|
|
- console.log(ev.target)
|
|
|
- global.android.inputMethodManager(false);
|
|
|
- })
|
|
|
-}
|
|
|
+//
|
|
|
+// // if (global.android) {
|
|
|
+// const isEditInput = (dom: HTMLElement) => {
|
|
|
+// const tagName = dom.tagName.toUpperCase();
|
|
|
+// const isInput = tagName === "INPUT"
|
|
|
+// const isTextarea = tagName === "TEXTAREA"
|
|
|
+// console.log(isInput && dom.getAttribute("type") === "text")
|
|
|
+// if (!(isInput && dom.getAttribute("type") === "text") && !isTextarea) {
|
|
|
+// return false;
|
|
|
+// }
|
|
|
+// console.log("???")
|
|
|
+// return !dom.hasAttribute("readonly")
|
|
|
+// }
|
|
|
+// document.documentElement.addEventListener('focusin', ev => {
|
|
|
+// console.log("获得焦点")
|
|
|
+// console.log(ev.target)
|
|
|
+// if (isEditInput(ev.target as HTMLElement)) {
|
|
|
+// global.android.inputMethodManager(true);
|
|
|
+// }
|
|
|
+// })
|
|
|
+// document.documentElement.addEventListener('focusout', ev => {
|
|
|
+// console.log("失去焦点")
|
|
|
+// console.log(ev.target)
|
|
|
+// if (isEditInput(ev.target as HTMLElement)) {
|
|
|
+// global.android.inputMethodManager(false);
|
|
|
+// }
|
|
|
+// })
|
|
|
+// // }
|
|
|
|
|
|
loadStore().catch((e) => {
|
|
|
console.error(e);
|