mirror of
https://github.com/ueberdosis/tiptap.git
synced 2025-01-18 22:36:14 +08:00
fix: show bubble menu for atom nodes even if there is no text content, fix #1446
This commit is contained in:
parent
6034eb9b30
commit
a3a7650784
@ -102,7 +102,10 @@ export class BubbleMenuView {
|
||||
// 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) {
|
||||
const { parent } = $anchor
|
||||
const isEmptyTextBlock = parent.type.isTextblock && !parent.textContent
|
||||
|
||||
if (empty || isEmptyTextBlock) {
|
||||
this.hide()
|
||||
|
||||
return
|
||||
|
Loading…
Reference in New Issue
Block a user