From 0ed7f551342772703db4d4772c4e195ad6c2f969 Mon Sep 17 00:00:00 2001 From: Vanessa Date: Thu, 12 Sep 2024 21:18:40 +0800 Subject: [PATCH] :art: https://github.com/siyuan-note/siyuan/issues/12132 --- app/src/layout/tabUtil.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/app/src/layout/tabUtil.ts b/app/src/layout/tabUtil.ts index d956e9be8..5a809a91d 100644 --- a/app/src/layout/tabUtil.ts +++ b/app/src/layout/tabUtil.ts @@ -253,13 +253,20 @@ export const copyTab = (app: App, tab: Tab) => { callback(newTab: Tab) { let model: Model; if (tab.model instanceof Editor) { + const newAction: string[] = [] + // https://github.com/siyuan-note/siyuan/issues/12132 + tab.model.editor.protyle.block.action.forEach(item => { + if (item !== Constants.CB_GET_APPEND && item !== Constants.CB_GET_BEFORE && item !== Constants.CB_GET_HTML) { + newAction.push(item) + } + }) model = new Editor({ app, tab: newTab, blockId: tab.model.editor.protyle.block.id, rootId: tab.model.editor.protyle.block.rootID, // https://github.com/siyuan-note/siyuan/issues/12150 - action: tab.model.editor.protyle.block.action, + action: newAction, }); } else if (tab.model instanceof Asset) { model = new Asset({