From a9351cc4ebbe43b81a5a454799efc73bfe56eb57 Mon Sep 17 00:00:00 2001 From: Vanessa Date: Mon, 27 Oct 2025 17:36:29 +0800 Subject: [PATCH] :rotating_light: --- app/src/layout/util.ts | 1 - app/src/protyle/export/index.ts | 2 +- app/src/protyle/wysiwyg/index.ts | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/app/src/layout/util.ts b/app/src/layout/util.ts index ed33c417f..7f2a8136a 100644 --- a/app/src/layout/util.ts +++ b/app/src/layout/util.ts @@ -16,7 +16,6 @@ import {focusByOffset, focusByRange, getSelectionOffset} from "../protyle/util/s import {hideElements} from "../protyle/ui/hideElements"; import {fetchPost} from "../util/fetch"; import {hasClosestBlock, hasClosestByClassName} from "../protyle/util/hasClosest"; -import {getContenteditableElement} from "../protyle/wysiwyg/getBlock"; import {Constants} from "../constants"; import {saveScroll} from "../protyle/scroll/saveScroll"; import {Backlink} from "./dock/Backlink"; diff --git a/app/src/protyle/export/index.ts b/app/src/protyle/export/index.ts index 0d74b7898..2da1fe13e 100644 --- a/app/src/protyle/export/index.ts +++ b/app/src/protyle/export/index.ts @@ -669,7 +669,7 @@ export const onExport = async (data: IWebSocketData, filePath: string, exportOpt if (!isDefault) { themeStyle = ``; } - let screenWidth = getScreenWidth(); + const screenWidth = getScreenWidth(); const minWidthHtml = isInAndroid() || isInHarmony() ? `document.body.style.minWidth = "${screenWidth}px"` : ""; const html = ` diff --git a/app/src/protyle/wysiwyg/index.ts b/app/src/protyle/wysiwyg/index.ts index 55f40ae3d..8583054d1 100644 --- a/app/src/protyle/wysiwyg/index.ts +++ b/app/src/protyle/wysiwyg/index.ts @@ -3036,7 +3036,7 @@ export class WYSIWYG { let newRange = getEditorRange(this.element); // 点击两侧或间隙导致光标跳转到开头 https://github.com/siyuan-note/siyuan/issues/16179 if (hasClosestBlock(event.target) !== hasClosestBlock(newRange.startContainer) && - this.element.querySelector('[data-node-id]')?.contains(newRange.startContainer)) { + this.element.querySelector("[data-node-id]")?.contains(newRange.startContainer)) { const rect = this.element.getBoundingClientRect(); let rangeElement = document.elementFromPoint(rect.left + rect.width / 2, event.clientY); if (rangeElement === this.element) {