Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't toggle marks when selection is created with keyboard #5724

Closed
lawrencesin opened this issue Sep 19, 2024 · 0 comments · Fixed by #5725
Closed

Can't toggle marks when selection is created with keyboard #5724

lawrencesin opened this issue Sep 19, 2024 · 0 comments · Fixed by #5725
Labels

Comments

@lawrencesin
Copy link

Description
A hanging selection is present when using the keyboard (shift + arrow keys) to select text, this causes the marks to be in a state in which they are not clickable unless the selection is changed.

Recording
Slate Selection Bug

Sandbox
https://www.slatejs.org/examples/richtext

Steps
To reproduce the behavior:

  1. Go to https://www.slatejs.org/examples/richtext
  2. Clear all contents from editor
  3. Set alignment to left aligned
  4. Type each one of these on a separate line One, Two, Three
  5. With the cursor at the end of Three, hold down Shift and hit the arrow up key on the keyboard twice.
  6. "Two" and "Three" should be visibly selected
  7. Click on the marks Bold, Italic, Underline so that Two and Three are formatted
  8. Try clicking on the Bold, Italic, or Underline with the selection still active, notice that Two and Three are still formatted and you can't remove the marks from them unless you make the selection with the mouse.

Expectation
Two and Three is the only text visibly selected in this scenario so the user should be able to add marks and remove marks to them without having to make a new selection.

Environment

  • Slate Version: 0.110.1
  • Operating System: Mac/Windows
  • Browser: Chrome, Firefox, Brave
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant