-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
fix ime double input with mark #4158
Conversation
🦋 Changeset detectedLatest commit: 9208676 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
Thanks @githoniel! |
* fix ime double when apply mark * add changeset * refactor to use auto-incrementing key and add comments for it * Update lovely-walls-knock.md * Update lovely-walls-knock.md Co-authored-by: Ian Storm Taylor <ian@ianstormtaylor.com>
* fix ime double when apply mark * add changeset * refactor to use auto-incrementing key and add comments for it * Update lovely-walls-knock.md * Update lovely-walls-knock.md Co-authored-by: Ian Storm Taylor <ian@ianstormtaylor.com>
@githoniel I'm running into issues in my editor because of this change. In my case, I'm listening to Now I'm not really familiar with IME so is there a way to conditionalize the key increment? |
@rockettomatooo you may try to compare slate nodes to see if they are the same instead of DOM nodes. IME input is a hard problem to solve, strictly speaking it's a React Reconciliation's bug. I have not found a better solution for this issue |
@githoniel The problem I have is, that the browser does this comparison. What I described is the browsers logic to fire a Can you maybe explain to me, how the reconciliation bug occurs specifically? |
@rockettomatooo Chrome is able to remove composition text correctly when the final input text is on the side of the composition text. we will create a new node with marks and insert text in it so the the final input text is not on the side of the composition text. maybe we could move selection and insert new node in advance when |
Description
this pr will force
String
element refresh it self to avoid ime double inputIssue
No
Example
Context
while we should get
this is becasue we memoizedLeaf to avoid refresh. now we will refresh all sibling leaf when a leaf changes
Checks
yarn test
.yarn lint
. (Fix errors withyarn fix
.)yarn start
.)yarn changeset add
.)