-
Notifications
You must be signed in to change notification settings - Fork 46.4k
-
Notifications
You must be signed in to change notification settings - Fork 46.4k
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
Cannot type Chinese in <input />
under controlled mode + ReactDom 16.8.2
#14861
Comments
<input />
under controlled mode + ReactDom 16.8.2 development.js<input />
under controlled mode + ReactDom 16.8.2
The problem is not only with Chinese. Reproduced on 16.8.2. Please check the pen On 16.8.1 works correctly, upd.: |
Yikes! This isn't good! I can confirm with the DOM Test Fixtures that something changed between React 16.8.1 and 16.8.2 to break text selection restoration. The module that usually handles this hasn't been updated since November: I wonder what else it could be... |
It breaks our |
One possible cause could be the fiber reconciler to break composition state of input, committing values in a wrong stage |
|
@dancerphil I built a version of React that omits this addition and the problem persists, but thanks for taking a look! Just to reiterate: this is only reproducible in the UMD builds of React 16.8.2, at least for the latin character set. This Codesandbox is fine (CommonJS build) However this JSFiddle is broken (UMD Build) Would anyone be willing to verify this for me with composable characters (like Chinese)? |
I built a version of our DOM fixtures with this change: This is working for me with latin characters. Just for good measure: could someone confirm this with composable characters (like Chinese)? |
@nhunzaker For the future, please don't hesitate to reach out when you see a critical issue like this. I saw "Chinese" in the title and assumed this is some old IME bug. (Which is not to say we shouldn't look into it — but it wasn't obvious all inputs are broken by the latest patch.) |
@gaearon Sorry 😢. Will do. |
No problem, thanks for jumping on it anyway. :-) |
Confirmed this is a valid fix for composed Japanese too, 👍 |
Fixed in 16.8.3. |
Do you want to request a feature or report a bug?
bug
What is the current behavior?
Cannot type Chinese in
<input />
under controlled mode when using react-dom 16.8.2 via CNDIf the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem. Your bug will get fixed much faster if we can run your code and it doesn't have dependencies other than React. Paste the link to your JSFiddle (https://jsfiddle.net/Luktwrdm/) or CodeSandbox (https://codesandbox.io/s/new) example below:
https://jsfiddle.net/youluna/egz9Lvrp/36/
What is the expected behavior?
Can type Chinese characters
Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?
Not worked in react-dom 16.8.2
But worked well in react-dom 16.8.1
related alibaba-fusion/next#324
update:
It's wired that use React as a <script> tag from a CDN doesn't work, but as a react package on npm worked well. Both are version 16.8.2
The text was updated successfully, but these errors were encountered: