Merge branch 'main' of github.com:ueberdosis/tiptap into main

This commit is contained in:
Hans Pagel 2021-04-22 09:09:24 +02:00
commit 96ff9c04c0

View File

@ -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