This commit is contained in:
Vanessa 2023-07-20 23:31:45 +08:00
parent 2ffc64a500
commit edcd372154
2 changed files with 9 additions and 0 deletions

View file

@ -111,6 +111,9 @@ export const globalShortcut = (app: App) => {
item.classList.remove("protyle-breadcrumb__bar--hide");
});
window.siyuan.hideBreadcrumb = false;
getAllModels().editor.forEach(item => {
item.editor.protyle.breadcrumb.render(item.editor.protyle, true);
});
}
if (event.buttons === 0 && // 鼠标按键被按下时不触发
window.siyuan.layout.bottomDock &&

View file

@ -2003,6 +2003,12 @@ export class WYSIWYG {
range.selectNodeContents(emptyEditElement);
range.collapse(true);
focusByRange(range);
// 需等待 range 更新再次进行渲染
if (protyle.options.render.breadcrumb) {
setTimeout(() => {
protyle.breadcrumb.render(protyle);
}, Constants.TIMEOUT_TRANSITION)
}
} else if (lastEditElement) {
range.selectNodeContents(lastEditElement);
range.collapse(false);