🐛 no editor

This commit is contained in:
Vanessa 2023-04-12 18:22:54 +08:00
parent a3dad54fdd
commit 49936f4ae4

View file

@ -42,8 +42,9 @@ export const handleTouchEnd = (event: TouchEvent) => {
) {
return;
}
window.siyuan.mobile.editor.protyle.contentElement.style.overflow = "";
if (window.siyuan.mobile.editor) {
window.siyuan.mobile.editor.protyle.contentElement.style.overflow = "";
}
// 有些事件不经过 touchstart 和 touchmove因此需设置为 null 不再继续执行
clientX = null;
@ -243,7 +244,9 @@ export const handleTouchMove = (event: TouchEvent) => {
}
activeBlur();
hideKeyboardToolbar();
window.siyuan.mobile.editor.protyle.contentElement.style.overflow = "hidden";
if (window.siyuan.mobile.editor) {
window.siyuan.mobile.editor.protyle.contentElement.style.overflow = "hidden";
}
}
};