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

don't re-render editor during compositions #2067

Closed
ianstormtaylor opened this issue Aug 9, 2018 · 2 comments · Fixed by #2370
Closed

don't re-render editor during compositions #2067

ianstormtaylor opened this issue Aug 9, 2018 · 2 comments · Fixed by #2370

Comments

@ianstormtaylor
Copy link
Owner

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

Bug,

What's the current behavior?

Right now we re-render the editor to show/hide the placeholder during compositionstart and compositionend events. But this results in the composition being aborted/broken in some IMEs.

What's the expected behavior?

We need to change this logic to no re-render the editor, but just re-render the placeholder itself I think. This could be accomplished with some sort of "connected" <Placeholder> component I believe, which can be toggled from the plugin code.

This is related to #2062.

@zhujinxuan
Copy link
Contributor

Hi, I am not sure why we put isComposing in state. this.setState is not immediate, and can cause re-render.

Is there a special reason of putting isComposing in state?

@ianstormtaylor
Copy link
Owner Author

@zhujinxuan check out the comments in the source linked above.

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

Successfully merging a pull request may close this issue.

2 participants