mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-05 16:28:49 +01:00
🎨 No longer add the id attribute to block elements after setting the attribute https://github.com/siyuan-note/siyuan/issues/15327
This commit is contained in:
parent
f28ccd64b5
commit
0394521e1f
1 changed files with 5 additions and 0 deletions
|
|
@ -607,6 +607,11 @@ export const onTransaction = (protyle: IProtyle, operation: IOperation, isUndo:
|
|||
data.new.style += ";animation:addCard 450ms linear";
|
||||
}
|
||||
Object.keys(data.new).forEach(key => {
|
||||
if ("id" === key) {
|
||||
// 设置属性以后不应该给块元素添加 id 属性 No longer add the `id` attribute to block elements after setting the attribute https://github.com/siyuan-note/siyuan/issues/15327
|
||||
return;
|
||||
}
|
||||
|
||||
item.setAttribute(key, data.new[key]);
|
||||
if (key === Constants.CUSTOM_RIFF_DECKS && data.new[Constants.CUSTOM_RIFF_DECKS] !== data.old[Constants.CUSTOM_RIFF_DECKS]) {
|
||||
item.style.animation = "addCard 450ms linear";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue