From 9719757926e9431c95d1c40cdbeb5cb5782e9d30 Mon Sep 17 00:00:00 2001 From: Vanessa Date: Sun, 10 Jul 2022 19:50:02 +0800 Subject: [PATCH] =?UTF-8?q?:bug:=20=E5=87=BA=E7=8E=B0=E6=BB=9A=E5=8A=A8?= =?UTF-8?q?=E6=9D=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/src/protyle/ui/initUI.ts | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/app/src/protyle/ui/initUI.ts b/app/src/protyle/ui/initUI.ts index 03d8d4df1..43d7c81f2 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) {