Vanessa 2025-03-23 15:10:35 +08:00
parent 888e71e39e
commit abb703216e

View file

@ -572,11 +572,11 @@ export class Toolbar {
types = [...new Set(types)];
if (types.includes("block-ref") && item.getAttribute("data-subtype") === "d") {
// https://github.com/siyuan-note/siyuan/issues/14299
if (previousElement && previousElement.getAttribute("data-id") === item.getAttribute("data-id")) {
if (previousElement && previousElement.nodeType !== 3 && previousElement.getAttribute("data-id") === item.getAttribute("data-id")) {
previousElement.setAttribute("data-subtype", "s");
item.setAttribute("data-subtype", "s");
}
if (nextElement && nextElement.getAttribute("data-id") === item.getAttribute("data-id")) {
if (nextElement && nextElement.nodeType !== 3 && nextElement.getAttribute("data-id") === item.getAttribute("data-id")) {
nextElement.setAttribute("data-subtype", "s");
item.setAttribute("data-subtype", "s");
}