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

Do not move selection outside inline node when composition starts #5541

Merged
merged 2 commits into from
Feb 7, 2024

Conversation

12joan
Copy link
Contributor

@12joan 12joan commented Oct 27, 2023

Description
Removes logic that moves selection outside inline node when composition starts. I'm not 100% sure removing this behaviour is a good idea, but it seems necessary to preserve behaviour parity between IME and non-IME text insertion. See the linked issue for more info.

Issue
Fixes: #5540

Example
Old:
https://github.com/ianstormtaylor/slate/assets/4272090/6396943f-9167-41b1-99f4-e59b552d3738

New:
https://github.com/ianstormtaylor/slate/assets/4272090/b209abc6-4720-4913-9cc6-1711e3a02004

Checks

  • The new code matches the existing patterns and styles.
  • The tests pass with yarn test.
  • The linter passes with yarn lint. (Fix errors with yarn fix.)
  • The relevant examples still work. (Run examples with yarn start.)
  • You've added a changeset if changing functionality. (Add one with yarn changeset add.)

@changeset-bot
Copy link

changeset-bot bot commented Oct 27, 2023

🦋 Changeset detected

Latest commit: 8e3a9c7

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
slate-react Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@12joan
Copy link
Contributor Author

12joan commented Oct 27, 2023

I can't reproduce this Netlify build failure. yarn build passes for me locally.

https://app.netlify.com/sites/slatejs/deploys/653c11a6be7e130008cadad1

@12joan
Copy link
Contributor Author

12joan commented Nov 30, 2023

@dylans It looks like the Netlify failure was a one-off. Now it's just the Playwright failures we've been seeing on all PRs lately. Can we get this merged?

@ssshiiin
Copy link

@dylans
I'd like you to review and merge this pull request, please.

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

Successfully merging this pull request may close these issues.

Slate moves selection outside inline node when composition starts at end of inline node
3 participants