Skip to content

Commit

Permalink
Blur the editor when destroyed
Browse files Browse the repository at this point in the history
  • Loading branch information
marijnh committed Jun 10, 2024
1 parent 902a6e4 commit bcd41c5
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/editorview.ts
Original file line number Diff line number Diff line change
Expand Up @@ -850,6 +850,7 @@ export class EditorView {
/// plugins. The view instance can no longer be used after
/// calling this.
destroy() {
if (this.root.activeElement == this.contentDOM) this.contentDOM.blur()
for (let plugin of this.plugins) plugin.destroy(this)
this.plugins = []
this.inputState.destroy()
Expand Down

0 comments on commit bcd41c5

Please sign in to comment.