💄 防止右侧分屏后,左侧页签抖动

This commit is contained in:
Vanessa 2022-07-01 10:50:50 +08:00
parent 7151e6d486
commit 48933edf55
2 changed files with 5 additions and 0 deletions

View File

@ -2,6 +2,7 @@
padding: 34px 16px 16px 24px;
cursor: text;
transition: padding .15s cubic-bezier(0, 0, .2, 1) 0ms;
box-sizing: border-box;
&:focus {
outline: none;

View File

@ -58,6 +58,10 @@ export const setPadding = (protyle: IProtyle) => {
min16 = 96
min24 = 96
}
if (!window.siyuan.config.editor.fullWidth) {
// 防止右侧分屏后,左侧页签抖动
protyle.wysiwyg.element.style.width = (protyle.element.clientWidth - 10) + "px";
}
}
if (protyle.options.render.background && protyle.options.render.title) {
protyle.background.element.lastElementChild.setAttribute("style", `left:${min16}px`);