Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

:bug: 出现滚动条

Vanessa9719757926e9
diff --git a/app/src/protyle/ui/initUI.ts b/app/src/protyle/ui/initUI.ts
index 03d8d4df10..43d7c81f24 100644
--- a/app/src/protyle/ui/initUI.ts
+++ b/app/src/protyle/ui/initUI.ts
@@ -76,11 +76,18 @@ export const setPadding = (protyle: IProtyle) => {
}
}
protyle.wysiwyg.element.style.padding = `16px ${min16}px ${bottomHeight} ${min24}px`;
- if (!isMobile() && !window.siyuan.config.editor.fullWidth) {
+ if (!isMobile()) {
// 防止右侧分屏后,左侧页签抖动;10 为滚动条宽度
- 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";
+ if (!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 = "";
+ }
}
}
if (window.siyuan.config.editor.codeSyntaxHighlightLineNum) {