From 3807aab0781adf28ceb5f545d6bd5db2c58b3399 Mon Sep 17 00:00:00 2001 From: Van Date: Thu, 20 Feb 2020 13:06:58 +0800 Subject: [PATCH] :bug: fix #158 --- CHANGELOG.md | 3 ++- src/ts/wysiwyg/processKeydown.ts | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3672e0773..7aee054d5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -46,8 +46,9 @@ * [81](https://github.com/Vanessa219/vditor/issues/81) 链接和图片嵌套问题 `修复缺陷` -### v2.2.2 / 2020-02-19 +### v2.2.3 / 2020-02-20 +* [158](https://github.com/Vanessa219/vditor/issues/158) tab key is not working when no text `修复缺陷` * [156](https://github.com/Vanessa219/vditor/issues/156) li 缩进后没有渲染代码块 `修复缺陷` * [155](https://github.com/Vanessa219/vditor/issues/155) blockquote 插入光标错误 `修复缺陷` * [154](https://github.com/Vanessa219/vditor/issues/154) the cursor is disapeared after tab pressed at editor mode `修复缺陷` diff --git a/src/ts/wysiwyg/processKeydown.ts b/src/ts/wysiwyg/processKeydown.ts index 38d86fcac..88133974f 100644 --- a/src/ts/wysiwyg/processKeydown.ts +++ b/src/ts/wysiwyg/processKeydown.ts @@ -565,7 +565,7 @@ export const processKeydown = (vditor: IVditor, event: KeyboardEvent) => { } else { // 当前任务列表有文字,光标后的文字需添加到新任务列表中 range.setEndAfter(taskItemElement.lastChild); - taskItemElement.insertAdjacentHTML("afterend", `
  • `); + taskItemElement.insertAdjacentHTML("afterend", `
  • `); document.querySelector("wbr").after(range.extractContents()); } setRangeByWbr(vditor.wysiwyg.element, range);