Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

:art: https://github.com/siyuan-note/siyuan/issues/16051

Vanessa99fe06931096
diff --git a/app/src/protyle/wysiwyg/list.ts b/app/src/protyle/wysiwyg/list.ts
index 9257fdf47c..9f5d686ed4 100644
--- a/app/src/protyle/wysiwyg/list.ts
+++ b/app/src/protyle/wysiwyg/list.ts
@@ -6,6 +6,7 @@ import {Constants} from "../../constants";
import {moveToPrevious, removeBlock} from "./remove";
import {hasClosestByClassName} from "../util/hasClosest";
import {setFold} from "../../menus/protyle";
+import {getParentBlock} from "./getBlock";
export const updateListOrder = (listElement: Element, sIndex?: number) => {
if (listElement.getAttribute("data-subtype") !== "o") {
@@ -352,13 +353,14 @@ export const listOutdent = (protyle: IProtyle, liItemElements: Element[], range:
// zoom in 列表项
return;
}
- const parentLiItemElement = liElement.parentElement;
+ const parentLiItemElement = getParentBlock(liElement);
const parentParentElement = parentLiItemElement.parentElement;
if (liElement.previousElementSibling?.classList.contains("protyle-action") && !parentParentElement.getAttribute("data-node-id")) {
// https://ld246.com/article/1691981936960 情况下 zoom in 列表项
return;
}
- if (parentLiItemElement.classList.contains("protyle-wysiwyg") || parentLiItemElement.classList.contains("sb") || parentLiItemElement.classList.contains("bq")) {
+ if (parentLiItemElement.classList.contains("protyle-wysiwyg") || parentLiItemElement.classList.contains("sb") ||
+ parentLiItemElement.classList.contains("bq") || parentLiItemElement.classList.contains("callout")) {
// 顶层列表
const topDoOperations: IOperation[] = [];
const topUndoOperations: IOperation[] = [];