An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作
TypeScript agentic-aiai-agentknowledge-baselocal-firstmarkdownmcpmindmapnote-takingself-hostedsiyuanworkspace
:art: fix https://github.com/siyuan-note/siyuan/issues/6361
Vanessa9ae773dd3c17
diff --git a/app/src/layout/index.ts b/app/src/layout/index.tsindex 9d0740b877..5ff3dd580f 100644--- a/app/src/layout/index.ts+++ b/app/src/layout/index.ts@@ -79,6 +79,14 @@ export class Layout {item.element.style.width = "";item.element.style.height = "";item.element.classList.add("fn__flex-1");+ if (this.direction === "lr") {+ // 向右分屏,左侧文档抖动,移除动画和边距+ item.element.querySelectorAll(".protyle-wysiwyg").forEach((element: HTMLElement) => {+ element.style.transition = "none"+ element.style.paddingRight = "16px";+ element.style.paddingLeft = "24px";+ });+ }item.element.after(child.element);return true;}diff --git a/app/src/protyle/scroll/event.ts b/app/src/protyle/scroll/event.tsindex 56a7834d52..436df0a769 100644--- a/app/src/protyle/scroll/event.ts+++ b/app/src/protyle/scroll/event.ts@@ -74,6 +74,8 @@ export const scrollEvent = (protyle: IProtyle, element: HTMLElement) => {// upif (element.scrollTop < element.clientHeight &&protyle.wysiwyg.element.firstElementChild.getAttribute("data-eof") !== "true") {+ // 禁用滚动时会产生抖动 https://ld246.com/article/1666717094418+ protyle.contentElement.style.width = (protyle.contentElement.clientWidth) + "px";protyle.contentElement.style.overflow = "hidden";protyle.wysiwyg.element.setAttribute("data-top", element.scrollTop.toString());fetchPost("/api/filetree/getDoc", {@@ -83,6 +85,7 @@ export const scrollEvent = (protyle: IProtyle, element: HTMLElement) => {size: Constants.SIZE_GET,}, getResponse => {protyle.contentElement.style.overflow = "";+ protyle.contentElement.style.width = "";onGet(getResponse, protyle, [Constants.CB_GET_BEFORE, Constants.CB_GET_UNCHANGEID]);});}diff --git a/app/src/protyle/ui/initUI.ts b/app/src/protyle/ui/initUI.tsindex 5d7ac0d159..08b101349c 100644--- a/app/src/protyle/ui/initUI.ts+++ b/app/src/protyle/ui/initUI.ts@@ -97,21 +97,7 @@ export const setPadding = (protyle: IProtyle) => {} else {protyle.wysiwyg.element.style.padding = `16px ${min16}px ${bottomHeight} ${min24}px`;}- if (!isMobile()) {- // 防止右侧分屏后,左侧页签抖动;10 为滚动条宽度- if (!protyle.options.backlinkData && // https://github.com/siyuan-note/siyuan/issues/6099- !window.siyuan.config.editor.fullWidth) {- protyle.wysiwyg.element.style.width = (protyle.element.clientWidth - 10) + "px";- if (protyle.options.render.title) {- protyle.title.element.style.width = (protyle.element.clientWidth - min16 - min24 - 10) + "px";- }- } else {- protyle.wysiwyg.element.style.width = "";- if (protyle.options.render.title) {- protyle.title.element.style.width = "";- }- }- }+ protyle.wysiwyg.element.style.transition = ""; // addWnd 时防止向右分屏,左侧文档抖动,移除动画if (window.siyuan.config.editor.codeSyntaxHighlightLineNum) {setTimeout(() => { // https://github.com/siyuan-note/siyuan/issues/5612protyle.wysiwyg.element.querySelectorAll('.code-block [contenteditable="true"]').forEach((block: HTMLElement) => {