This commit is contained in:
Vanessa 2023-04-10 11:25:25 +08:00
parent 3744873734
commit 4968f3f0f1
4 changed files with 312 additions and 300 deletions

View file

@ -135,6 +135,10 @@ export const goBack = () => {
document.getElementById("sidebar").style.transform === "translateX(0px)") {
closePanel();
return;
} else if (window.siyuan.mobile.editor && !window.siyuan.mobile.editor.protyle.toolbar.subElement.classList.contains("fn__none")) {
hideElements(["util"], window.siyuan.mobile.editor.protyle);
closePanel();
return;
}
if (window.JSAndroid && window.siyuan.backStack.length < 1) {
if (document.querySelector('#message [data-id="exitTip"]')) {

View file

@ -32,6 +32,7 @@ export const handleTouchEnd = (event: TouchEvent) => {
const target = event.target as HTMLElement;
if (!clientX || !clientY || typeof yDiff === "undefined" ||
target.tagName === "AUDIO" ||
(window.siyuan.mobile.editor && !window.siyuan.mobile.editor.protyle.toolbar.subElement.classList.contains("fn__none")) ||
hasClosestByClassName(target, "viewer-container") ||
hasClosestByClassName(target, "b3-dialog") ||
hasClosestByClassName(target, "keyboard") ||
@ -157,6 +158,7 @@ export const handleTouchMove = (event: TouchEvent) => {
const target = event.target as HTMLElement;
if (!clientX || !clientY ||
target.tagName === "AUDIO" ||
(window.siyuan.mobile.editor && !window.siyuan.mobile.editor.protyle.toolbar.subElement.classList.contains("fn__none")) ||
hasClosestByClassName(target, "b3-dialog") ||
hasClosestByClassName(target, "keyboard") ||
hasClosestByClassName(target, "viewer-container") ||