Editable mentions don't support exiting when text selected #640
Labels
good first issue
Good for newcomers
package: remirror 🟣
Label for the remirror package and all relevant scoped `@remirror/*` packages.
priority: high 🔼
This should be prioritised and completed soon.
status: confirmed 🟢
The bug has been tested and confirmed.
type: bug 🪲
Something isn't working
Projects
Milestone
Summary
Showcase Link
Related to #639
Mentions don't allow exit when text is selected.
Steps to reproduce
@abc
@
symbol.Expected results
You should be able to select the
@
symbol.Actual results
The selection jumps to the end when of the
c
key at the point the selection touches the@
symbol.Possible Solution
Preserve selection currently doesn't work for non-empty selection.
Perhaps, rather than using
from
andto
the implementation should use thehead
andanchor
to ensure that exiting the mention preserves the intended selection.Something like this should be added to the
preserveSelection
in@remirror/core-utils
.head
(the movable part of the selection) andanchor
(the fixed part of the selection) over the current transaction steps.min(head, anchor
, to:max(head, anchor)
and apply it to the transaction.Screenshot
The text was updated successfully, but these errors were encountered: