mirror of
https://github.com/ueberdosis/tiptap.git
synced 2024-11-24 11:49:02 +08:00
fix: add CellSelection support for bubble menu
This commit is contained in:
parent
9399e3061f
commit
6472d2c271
@ -88,12 +88,11 @@ export class BubbleMenuView {
|
||||
return
|
||||
}
|
||||
|
||||
const {
|
||||
from,
|
||||
to,
|
||||
empty,
|
||||
$anchor,
|
||||
} = selection
|
||||
const { empty, $anchor, ranges } = selection
|
||||
|
||||
// support for CellSelections
|
||||
const from = Math.min(...ranges.map(range => range.$from.pos))
|
||||
const to = Math.max(...ranges.map(range => range.$to.pos))
|
||||
|
||||
// Sometime check for `empty` is not enough.
|
||||
// Doubleclick an empty paragraph returns a node size of 2.
|
||||
|
Loading…
Reference in New Issue
Block a user