diff --git a/app/src/search/assets.ts b/app/src/search/assets.ts index d754cc54b2a..e4807f71af0 100644 --- a/app/src/search/assets.ts +++ b/app/src/search/assets.ts @@ -135,7 +135,7 @@ export const openSearchAsset = (element: HTMLElement, isStick: boolean) => { moveEvent.stopPropagation(); const previousNowSize = (previousSize + (moveEvent[direction === "lr" ? "clientX" : "clientY"] - x)); const nextNowSize = (nextSize - (moveEvent[direction === "lr" ? "clientX" : "clientY"] - x)); - if (previousNowSize < 120 || nextNowSize < 120) { + if (nextNowSize < 120 || (previousNowSize < 120 && (previousSize >= 120 || previousNowSize < previousSize))) { return; } previewElement.style[direction === "lr" ? "width" : "height"] = nextNowSize + "px"; diff --git a/app/src/search/unRef.ts b/app/src/search/unRef.ts index 85c4e6bff0d..08c521a7f9a 100644 --- a/app/src/search/unRef.ts +++ b/app/src/search/unRef.ts @@ -52,7 +52,8 @@ export const openSearchUnRef = (element: HTMLElement, editor: Protyle) => { moveEvent.stopPropagation(); const previousNowSize = (previousSize + (moveEvent[direction === "lr" ? "clientX" : "clientY"] - x)); const nextNowSize = (nextSize - (moveEvent[direction === "lr" ? "clientX" : "clientY"] - x)); - if (previousNowSize < 120 || nextNowSize < 120) { + // 编辑器 scroll 最小高度 155px https://github.com/siyuan-note/siyuan/issues/8519 + if (nextNowSize < 155 || (previousNowSize < 120 && (previousSize >= 120 || previousNowSize < previousSize))) { return; } nextElement.style[direction === "lr" ? "width" : "height"] = nextNowSize + "px"; diff --git a/app/src/search/util.ts b/app/src/search/util.ts index d94581baca0..d4a7f5154c0 100644 --- a/app/src/search/util.ts +++ b/app/src/search/util.ts @@ -301,7 +301,8 @@ export const genSearch = (app: App, config: Config.IUILayoutTabSearchConfig, ele moveEvent.stopPropagation(); const previousNowSize = (previousSize + (moveEvent[direction === "lr" ? "clientX" : "clientY"] - x)); const nextNowSize = (nextSize - (moveEvent[direction === "lr" ? "clientX" : "clientY"] - x)); - if (previousNowSize < 120 || nextNowSize < 120) { + // 编辑器 scroll 最小高度 155px https://github.com/siyuan-note/siyuan/issues/8519 + if (nextNowSize < 155 || (previousNowSize < 120 && (previousSize >= 120 || previousNowSize < previousSize))) { return; } nextElement.style[direction === "lr" ? "width" : "height"] = nextNowSize + "px";