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

move{Point}Forward and move{Point}Backward behave unexpectedly when moving across Text nodes. #3042

Closed
nz-chris opened this issue Sep 30, 2019 · 1 comment

Comments

@nz-chris
Copy link

Do you want to request a feature or report a bug?

Report a bug.

What’s the current behavior?

When using these two commands...

...you will see unexpected behaviour if the argument n has a value such that {Point} will be expected to move from one Text to another.
In this example video, I am on a fork of the latest master branch, and the only change I have made is adding a button to the toolbar in the rich text example that does this.editor.moveForward(3) on click. I use this button twice. The first time is unexpected behaviour (the cursor mover more than 3 characters) because the selection movement crosses a border between two Text nodes, and the second time is expected behaviour because the selection movement stays within a single Text.
slate bug

What’s the expected behavior?

The result of the command moves {Point} a distance of n characters in the appropriate direction.

@ianstormtaylor
Copy link
Owner

I believe that this may be fixed by #3093, which has changed a lot of the logic in Slate and slate-react especially. I'm going to close this out, but as always, feel free to open a new issue if it persists for you. Thanks for understanding.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants