浏览代码

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

Vanessa 6 月之前
父节点
当前提交
7afdb026a1
共有 2 个文件被更改,包括 3 次插入1 次删除
  1. 2 0
      CHANGELOG.md
  2. 1 1
      src/ts/util/fixBrowserBehavior.ts

+ 2 - 0
CHANGELOG.md

@@ -27,6 +27,8 @@
 
 
 ### v3.11.1 / 2025-05
 ### v3.11.1 / 2025-05
 
 
+* [待办列表回车换行错误](https://github.com/Vanessa219/vditor/issues/1789) `修复缺陷`
+
 ### v3.11.0 / 2025-04-09
 ### v3.11.0 / 2025-04-09
 
 
 * [添加 `options.upload.cancel` 回调](https://github.com/Vanessa219/vditor/issues/1791) `引入特性`
 * [添加 `options.upload.cancel` 回调](https://github.com/Vanessa219/vditor/issues/1791) `引入特性`

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

@@ -1080,7 +1080,7 @@ 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 = hasClosestByMatchTag(startContainer, "li");
+    const taskItemElement = hasClosestByMatchTag(startContainer, "LI");
     if (taskItemElement && taskItemElement.classList.contains("vditor-task")) {
     if (taskItemElement && taskItemElement.classList.contains("vditor-task")) {
         if (matchHotKey("⇧⌘J", event)) {
         if (matchHotKey("⇧⌘J", event)) {
             // ctrl + shift: toggle checked
             // ctrl + shift: toggle checked