mirror of
https://github.com/ueberdosis/tiptap.git
synced 2024-11-29 08:19:34 +08:00
Merge branch 'main' of github.com:ueberdosis/tiptap into main
This commit is contained in:
commit
96ff9c04c0
@ -88,9 +88,17 @@ export class BubbleMenuView {
|
||||
return
|
||||
}
|
||||
|
||||
const { from, to, empty } = selection
|
||||
const {
|
||||
from,
|
||||
to,
|
||||
empty,
|
||||
$anchor,
|
||||
} = selection
|
||||
|
||||
if (empty) {
|
||||
// Sometime check for `empty` is not enough.
|
||||
// Doubleclick an empty paragraph returns a node size of 2.
|
||||
// So we check also for an empty text size.
|
||||
if (empty || !$anchor.parent.textContent) {
|
||||
this.hide()
|
||||
|
||||
return
|
||||
|
Loading…
Reference in New Issue
Block a user