mirror of
https://github.com/ueberdosis/tiptap.git
synced 2025-06-07 01:12:56 +08:00
fix: maybe hide tippy on blur, fix #1433
This commit is contained in:
parent
1645df9adc
commit
063ced27ca
@ -139,6 +139,13 @@ export class BubbleMenuView {
|
||||
hideOnClick: 'toggle',
|
||||
...this.tippyOptions,
|
||||
})
|
||||
|
||||
// maybe we have to hide tippy on its own blur event as well
|
||||
if (this.tippy.popper.firstChild) {
|
||||
(this.tippy.popper.firstChild as HTMLElement).addEventListener('blur', event => {
|
||||
this.blurHandler({ event })
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
update(view: EditorView, oldState?: EditorState) {
|
||||
|
@ -121,6 +121,13 @@ export class FloatingMenuView {
|
||||
hideOnClick: 'toggle',
|
||||
...this.tippyOptions,
|
||||
})
|
||||
|
||||
// maybe we have to hide tippy on its own blur event as well
|
||||
if (this.tippy.popper.firstChild) {
|
||||
(this.tippy.popper.firstChild as HTMLElement).addEventListener('blur', event => {
|
||||
this.blurHandler({ event })
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
update(view: EditorView, oldState?: EditorState) {
|
||||
|
Loading…
Reference in New Issue
Block a user