1
0
Эх сурвалжийг харах

:art: https://github.com/Vanessa219/vditor/issues/1754

Vanessa 8 сар өмнө
parent
commit
14d7bfae68

+ 4 - 1
CHANGELOG.md

@@ -20,8 +20,11 @@
 
 
 * [open issues](https://github.com/Vanessa219/vditor/issues)
 * [open issues](https://github.com/Vanessa219/vditor/issues)
 
 
-### v3.10.9 / 2025-01
+### v3.11.0 / 2025-03
 
 
+### v3.10.9 / 2025-02
+
+* [任务列表中的无序列表回车异常](https://github.com/Vanessa219/vditor/issues/1754) `修复缺陷`
 * [添加 `insertEmptyBlock` 方法](https://github.com/Vanessa219/vditor/pull/1745) `开发重构`
 * [添加 `insertEmptyBlock` 方法](https://github.com/Vanessa219/vditor/pull/1745) `开发重构`
 * [撤销后图表会重复](https://github.com/Vanessa219/vditor/issues/1738) `修复缺陷`
 * [撤销后图表会重复](https://github.com/Vanessa219/vditor/issues/1738) `修复缺陷`
 * [设置 defaultLang 之后,指定代码失效](https://github.com/Vanessa219/vditor/issues/1728) `修复缺陷`
 * [设置 defaultLang 之后,指定代码失效](https://github.com/Vanessa219/vditor/issues/1728) `修复缺陷`

+ 2 - 2
src/ts/util/fixBrowserBehavior.ts

@@ -1080,8 +1080,8 @@ export const fixBlockquote = (vditor: IVditor, range: Range, event: KeyboardEven
 
 
 export const fixTask = (vditor: IVditor, range: Range, event: KeyboardEvent) => {
 export const fixTask = (vditor: IVditor, range: Range, event: KeyboardEvent) => {
     const startContainer = range.startContainer;
     const startContainer = range.startContainer;
-    const taskItemElement = hasClosestByClassName(startContainer, "vditor-task");
-    if (taskItemElement) {
+    const taskItemElement = hasClosestByMatchTag(startContainer, "li");
+    if (taskItemElement && taskItemElement.classList.contains("vditor-task")) {
         if (matchHotKey("⇧⌘J", event)) {
         if (matchHotKey("⇧⌘J", event)) {
             // ctrl + shift: toggle checked
             // ctrl + shift: toggle checked
             const inputElement = taskItemElement.firstElementChild as HTMLInputElement;
             const inputElement = taskItemElement.firstElementChild as HTMLInputElement;