From 6e8c42e521f139286993ecb47a39a7adf6c54350 Mon Sep 17 00:00:00 2001 From: Vanessa Date: Sat, 1 Mar 2025 19:27:15 +0800 Subject: [PATCH] :art: https://github.com/siyuan-note/siyuan/issues/14226 --- app/src/protyle/breadcrumb/index.ts | 2 +- app/src/protyle/ui/initUI.ts | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/src/protyle/breadcrumb/index.ts b/app/src/protyle/breadcrumb/index.ts index 126654e0c..98dc0b1db 100644 --- a/app/src/protyle/breadcrumb/index.ts +++ b/app/src/protyle/breadcrumb/index.ts @@ -171,7 +171,7 @@ ${padHTML} target = target.parentElement; } }); - /// if !MOBILE + /// #if !MOBILE element.addEventListener("mouseleave", () => { protyle.wysiwyg.element.querySelectorAll(".protyle-wysiwyg--hl").forEach(item => { item.classList.remove("protyle-wysiwyg--hl"); diff --git a/app/src/protyle/ui/initUI.ts b/app/src/protyle/ui/initUI.ts index b6f5fb534..91d53860e 100644 --- a/app/src/protyle/ui/initUI.ts +++ b/app/src/protyle/ui/initUI.ts @@ -14,6 +14,7 @@ import {transaction} from "../wysiwyg/transaction"; import {focusByRange} from "../util/selection"; /// #if !MOBILE import {moveResize} from "../../dialog/moveResize"; +/// #endif import { hasClosestBlock, hasClosestByAttribute, @@ -21,7 +22,6 @@ import { hasClosestByTag, isInEmbedBlock } from "../util/hasClosest"; -/// #endif export const initUI = (protyle: IProtyle) => { protyle.contentElement = document.createElement("div"); @@ -171,7 +171,6 @@ export const initUI = (protyle: IProtyle) => { } } }); - /// if !MOBILE let overAttr = false; protyle.element.addEventListener("mouseover", (event: KeyboardEvent & { target: HTMLElement }) => { // attr @@ -237,6 +236,7 @@ export const initUI = (protyle: IProtyle) => { } // 面包屑 + /// if !MOBILE if (protyle.selectElement.classList.contains("fn__none")) { const svgElement = hasClosestByAttribute(event.target, "data-node-id", null); if (svgElement && svgElement.parentElement.classList.contains("protyle-breadcrumb__bar")) { @@ -249,8 +249,8 @@ export const initUI = (protyle: IProtyle) => { } } } + /// #endif }); - /// endif }; export const addLoading = (protyle: IProtyle, msg?: string) => {