🎨 Clean code

This commit is contained in:
Daniel 2025-04-08 09:44:32 +08:00
parent f1f34761c8
commit 744dc2b7f3
No known key found for this signature in database
GPG key ID: 86211BA83DF03017
2 changed files with 4 additions and 4 deletions

View file

@ -270,9 +270,9 @@ export const copyTab = (app: App, tab: Tab) => {
afterInitProtyle(editor) {
// https://github.com/siyuan-note/siyuan/issues/13851
if (tab.model instanceof Editor) {
const copyResizeTopElement = tab.model.editor.protyle.wysiwyg.element.querySelector("[data-resize-top]")
const copyResizeTopElement = tab.model.editor.protyle.wysiwyg.element.querySelector("[data-resize-top]");
if (copyResizeTopElement) {
const newElement = editor.protyle.wysiwyg.element.querySelector(`[data-node-id="${copyResizeTopElement.getAttribute("data-node-id")}"]`)
const newElement = editor.protyle.wysiwyg.element.querySelector(`[data-node-id="${copyResizeTopElement.getAttribute("data-node-id")}"]`);
if (newElement) {
editor.protyle.observerLoad?.disconnect();
newElement.scrollIntoView();