♻️ 移动端面包屑消失
This commit is contained in:
parent
a2e4f504a5
commit
2b9d5f0763
2 changed files with 8 additions and 7 deletions
|
@ -65,12 +65,8 @@ class App {
|
|||
if (navigator.userAgent.indexOf("iPhone") > -1) {
|
||||
document.addEventListener("touchstart", handleTouchStart, false);
|
||||
document.addEventListener("touchmove", handleTouchMove, false);
|
||||
document.addEventListener("touchend", handleTouchEnd, false);
|
||||
} else {
|
||||
document.addEventListener("touchend", () => {
|
||||
window.siyuan.mobileEditor?.protyle.breadcrumb.show();
|
||||
}, false);
|
||||
}
|
||||
document.addEventListener("touchend", handleTouchEnd, false);
|
||||
});
|
||||
setNoteBook();
|
||||
promiseTransactions();
|
||||
|
|
|
@ -9,8 +9,13 @@ const forwardStack: IBackStack[] = [];
|
|||
let previousIsBack = false;
|
||||
|
||||
export const handleTouchEnd = () => {
|
||||
window.siyuan.mobileEditor?.protyle.breadcrumb.show();
|
||||
if (!clientX || !clientY) return;
|
||||
if (window.siyuan.mobileEditor) {
|
||||
window.siyuan.mobileEditor.protyle.breadcrumb.show();
|
||||
}
|
||||
|
||||
if (!clientX || !clientY || navigator.userAgent.indexOf("iPhone") === -1) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (Math.abs(xDiff) > Math.abs(yDiff) && Math.abs(xDiff) > window.innerWidth / 2) {
|
||||
if (xDiff > 0) {
|
||||
|
|
Loading…
Add table
Reference in a new issue