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

fix(ComboBox): bring IME support back #4952

Merged
merged 4 commits into from
Jan 8, 2020

Conversation

asudoh
Copy link
Contributor

@asudoh asudoh commented Jan 6, 2020

This change backs out #3646 partially given moving inputValue state syncing code from handleOnInputValueChange to handleOnStateChange causes in-composition string (of IME) getting lost, because the different rendering sequence yielded by such change causes Downshift to
(temporarily) render an older (stale) value to the <input>.

Fixes #4947.

Changelog

Changed

  • Moved inputValue state syncing code back from handleOnStateChange to handleOnInputValueChange.

Testing / Reviewing

Testing should make sure combo box is not broken.

This change backs out carbon-design-system#3646 partially given moving `inputValue` state
syncing code from `handleOnInputValueChange` to `handleOnStateChange`
causes in-composition string (of IME) getting lost, because the
different rendering sequence yielded by such change causes Downshift to
(temporarily) render an older (stale) value to the `<input>`.

Fixes carbon-design-system#4947.
@asudoh asudoh requested a review from emyarod January 6, 2020 07:23
@asudoh asudoh requested a review from a team as a code owner January 6, 2020 07:23
@ghost ghost requested a review from dakahn January 6, 2020 07:23
@netlify
Copy link

netlify bot commented Jan 6, 2020

Deploy preview for the-carbon-components ready!

Built with commit 5c8917f

https://deploy-preview-4952--the-carbon-components.netlify.com

@netlify
Copy link

netlify bot commented Jan 6, 2020

Deploy preview for carbon-components-react ready!

Built with commit 5c8917f

https://deploy-preview-4952--carbon-components-react.netlify.com

@netlify
Copy link

netlify bot commented Jan 6, 2020

Deploy preview for carbon-elements failed.

Built with commit 5c8917f

https://app.netlify.com/sites/carbon-elements/deploys/5e151920875afa0008722547

@joshblack
Copy link
Contributor

@asudoh real quick, how would you recommend testing IME support? 👀

@asudoh
Copy link
Contributor Author

asudoh commented Jan 6, 2020

Basically you can just type some Asian characters as "composition text". For what "composition text" is, https://www.w3.org/TR/ime-api/ will be a good resource. For how to type Asian characters as "composition text" in Mac, https://support.apple.com/guide/mac-help/type-language-mac-input-sources-mchlp1406/mac and https://support.apple.com/guide/japanese-input-method/keyboard-shortcuts-jpim10263/mac are good resources for Japanese characters.

@joshblack
Copy link
Contributor

Thanks @asudoh!

@asudoh asudoh merged commit 5b734d8 into carbon-design-system:master Jan 8, 2020
@asudoh asudoh deleted the combobox-ime branch January 8, 2020 00:02
joshblack pushed a commit to joshblack/carbon that referenced this pull request Jan 13, 2020
This change backs out carbon-design-system#3646 partially given moving `inputValue` state
syncing code from `handleOnInputValueChange` to `handleOnStateChange`
causes in-composition string (of IME) getting lost, because the
different rendering sequence yielded by such change causes Downshift to
(temporarily) render an older (stale) value to the `<input>`.

Fixes carbon-design-system#4947.
joshblack pushed a commit to joshblack/carbon that referenced this pull request Jan 14, 2020
This change backs out carbon-design-system#3646 partially given moving `inputValue` state
syncing code from `handleOnInputValueChange` to `handleOnStateChange`
causes in-composition string (of IME) getting lost, because the
different rendering sequence yielded by such change causes Downshift to
(temporarily) render an older (stale) value to the `<input>`.

Fixes carbon-design-system#4947.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cannot use Chinese IME on ComboBox
3 participants