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