Skip to content

Commit

Permalink
🎨 fix #593
Browse files Browse the repository at this point in the history
  • Loading branch information
Vanessa219 committed Jul 20, 2020
1 parent e9981b6 commit 634e826
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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) `修复缺陷`
Expand Down
6 changes: 6 additions & 0 deletions src/ts/util/editorCommonEvent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}
Expand Down

0 comments on commit 634e826

Please sign in to comment.