You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When the user double click on an empty block, the selection moves "between" the two blocks.
Since selection.startKey != selection.endKey, then isExpanded = false.
It causes the example Hovering menu to bug (and similar applications).
In the slate example, when double clicking in an empty paragraph, the menu is not visible on the screen, but it is present with a style attribute in the DOM (invalid positioning because of this weird selection).
Suggested solution:
Change state.isExpanded to test if the blocks/offsets are consecutives
❌ state.isExpanded will depend on the document, and will differ from selection.isExpanded
Add a state.isSelectionEmpty to test if the blocks/offsets are consecutives
✅ It will not be a breaking change, but an addition
The text was updated successfully, but these errors were encountered:
When the user double click on an empty block, the selection moves "between" the two blocks.
Since
selection.startKey != selection.endKey
, thenisExpanded = false
.It causes the example Hovering menu to bug (and similar applications).
In the slate example, when double clicking in an empty paragraph, the menu is not visible on the screen, but it is present with a
style
attribute in the DOM (invalid positioning because of this weird selection).Suggested solution:
state.isExpanded
to test if the blocks/offsets are consecutivesstate.isExpanded
will depend on thedocument
, and will differ fromselection.isExpanded
state.isSelectionEmpty
to test if the blocks/offsets are consecutivesThe text was updated successfully, but these errors were encountered: