fix: Fix "destory" method in view plugins. (#1882)
This commit is contained in:
@@ -190,7 +190,7 @@ export class BubbleMenuView {
|
||||
|
||||
destroy() {
|
||||
this.tippy?.destroy()
|
||||
this.element.removeEventListener('mousedown', this.mousedownHandler)
|
||||
this.element.removeEventListener('mousedown', this.mousedownHandler, { capture: true })
|
||||
this.view.dom.removeEventListener('dragstart', this.dragstartHandler)
|
||||
this.editor.off('focus', this.focusHandler)
|
||||
this.editor.off('blur', this.blurHandler)
|
||||
|
||||
@@ -160,7 +160,7 @@ export class FloatingMenuView {
|
||||
|
||||
destroy() {
|
||||
this.tippy?.destroy()
|
||||
this.element.removeEventListener('mousedown', this.mousedownHandler)
|
||||
this.element.removeEventListener('mousedown', this.mousedownHandler, { capture: true })
|
||||
this.editor.off('focus', this.focusHandler)
|
||||
this.editor.off('blur', this.blurHandler)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user