fix(bubble-menu): avoid bluring if event is on the editor (#5835)

This commit is contained in:
Nick Perez 2024-11-17 14:52:33 +01:00 committed by GitHub
parent 3c82af3842
commit f67b217b30
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 21 additions and 0 deletions

View File

@ -0,0 +1,9 @@
---
"@tiptap/extension-floating-menu": patch
"@tiptap/extension-bubble-menu": patch
"@tiptap/react": patch
"@tiptap/vue-2": patch
"@tiptap/vue-3": patch
---
Fixes an issue where the bubble and flaoting menus on blur would remount

View File

@ -156,6 +156,12 @@ export class BubbleMenuView {
return
}
if (
event?.relatedTarget === this.editor.view.dom
) {
return
}
this.hide()
}

View File

@ -123,6 +123,12 @@ export class FloatingMenuView {
return
}
if (
event?.relatedTarget === this.editor.view.dom
) {
return
}
this.hide()
}