diff --git a/CHANGELOG.md b/CHANGELOG.md index d3a3aed0d..076c28b78 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -68,6 +68,7 @@ ### v3.3.10 / 2020-07-xx +* [593](https://github.com/Vanessa219/vditor/issues/593) IR 模式焦点离开时的渲染问题 `改进功能` * [604](https://github.com/Vanessa219/vditor/issues/604) 站外图片抓取请求的 Content-Type 是 text/plain `改进功能` * [597](https://github.com/Vanessa219/vditor/issues/597) one more backspace before delete lists `修复缺陷` * [599](https://github.com/Vanessa219/vditor/issues/599) Ordered list(minor bug) `修复缺陷` diff --git a/src/ts/util/editorCommonEvent.ts b/src/ts/util/editorCommonEvent.ts index 19b26f849..ef1332c3f 100644 --- a/src/ts/util/editorCommonEvent.ts +++ b/src/ts/util/editorCommonEvent.ts @@ -26,6 +26,12 @@ export const focusEvent = (vditor: IVditor, editorElement: HTMLElement) => { export const blurEvent = (vditor: IVditor, editorElement: HTMLElement) => { editorElement.addEventListener("blur", () => { + if (vditor.currentMode === "ir") { + const expandElement = vditor.ir.element.querySelector(".vditor-ir__node--expand"); + if (expandElement) { + expandElement.classList.remove("vditor-ir__node--expand"); + } + } if (vditor.options.blur) { vditor.options.blur(getMarkdown(vditor)); }