mirror of
https://github.com/ueberdosis/tiptap.git
synced 2025-06-08 01:53:04 +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',
|
hideOnClick: 'toggle',
|
||||||
...this.tippyOptions,
|
...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) {
|
update(view: EditorView, oldState?: EditorState) {
|
||||||
|
@ -121,6 +121,13 @@ export class FloatingMenuView {
|
|||||||
hideOnClick: 'toggle',
|
hideOnClick: 'toggle',
|
||||||
...this.tippyOptions,
|
...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) {
|
update(view: EditorView, oldState?: EditorState) {
|
||||||
|
Loading…
Reference in New Issue
Block a user