fix: add CellSelection support for bubble menu
This commit is contained in:
@@ -88,12 +88,11 @@ export class BubbleMenuView {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
const {
|
const { empty, $anchor, ranges } = selection
|
||||||
from,
|
|
||||||
to,
|
// support for CellSelections
|
||||||
empty,
|
const from = Math.min(...ranges.map(range => range.$from.pos))
|
||||||
$anchor,
|
const to = Math.max(...ranges.map(range => range.$to.pos))
|
||||||
} = selection
|
|
||||||
|
|
||||||
// Sometime check for `empty` is not enough.
|
// Sometime check for `empty` is not enough.
|
||||||
// Doubleclick an empty paragraph returns a node size of 2.
|
// Doubleclick an empty paragraph returns a node size of 2.
|
||||||
|
|||||||
Reference in New Issue
Block a user