Skip to content

Commit

Permalink
fix: 修复长按删除键,失去焦点不触发blur的bug
Browse files Browse the repository at this point in the history
  • Loading branch information
guqianfeng committed Apr 5, 2021
1 parent ec7766a commit 9530e28
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions examples/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@
editor.config.onchange = function (newHtml) {
console.log('onchange', newHtml)
}
// editor.config.onblur = function (newHtml) {
// console.log('onblur', newHtml)
// }
editor.config.onblur = function (newHtml) {
console.log('onblur', newHtml)
}
// editor.config.onfocus = function (newHtml) {
// console.log('onfocus', newHtml)
// }
Expand Down
2 changes: 1 addition & 1 deletion src/editor/init-fns/bind-event.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ function _bindFocusAndBlur(editor: Editor): void {

if (!isChild) {
// 若为选择工具栏中的功能,则不视为成 blur 操作
if ((isToolbar && !isMenu) || !editor.isFocus) {
if (isToolbar && !isMenu) {
return
}
_blurHandler(editor)
Expand Down

0 comments on commit 9530e28

Please sign in to comment.