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

[Autocomplete] Navigation event is triggered twice by IME #23044

Closed
2 tasks done
jiggum opened this issue Oct 14, 2020 · 1 comment · Fixed by #23050
Closed
2 tasks done

[Autocomplete] Navigation event is triggered twice by IME #23044

jiggum opened this issue Oct 14, 2020 · 1 comment · Fixed by #23050
Labels
bug 🐛 Something doesn't work component: autocomplete This is the name of the generic UI component, not the React module! ready to take Help wanted. Guidance available. There is a high chance the change will be accepted

Comments

@jiggum
Copy link
Contributor

jiggum commented Oct 14, 2020

  • The issue is present in the latest release.
  • I have searched the issues of this repository and believe that this is not a duplicate.

Current Behavior 😯

Oct-14-2020 15-04-27

When the ArrowDown is pressed at IME composing state, the second below option is highlighted.
(This is not only for ArrowDown key. All of the below switch-case's each key has this problem)
https://github.com/mui-org/material-ui/blob/5c9c97675f3e7d3978e664520f3fbbe595c78eee/packages/material-ui/src/useAutocomplete/useAutocomplete.js#L662-L771

Expected Behavior 🤔

When the ArrowDown is pressed at IME composing state, the first below option should highlighted.

Steps to Reproduce 🕹

Steps:

  1. See https://codesandbox.io/s/material-demo-forked-bdu70
  2. Make IME on with character '가'
  3. Hit ArrowDown
  4. The second below option is highlighted

Context 🔦

This Problem is related to #19435.

To expected behavior, I think below whole swich-case statements should place under the if statement of

if (event.which !== 229)

https://github.com/mui-org/material-ui/blob/5c9c97675f3e7d3978e664520f3fbbe595c78eee/packages/material-ui/src/useAutocomplete/useAutocomplete.js#L662-L771

Your Environment 🌎

Tech Version
Material-UI v4.11.0
Material-UI Lab v4.0.0-alpha.56
React v16.13.1
Browser macOS, Chrome/85.0.4183.102
@jiggum jiggum added the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Oct 14, 2020
@oliviertassinari oliviertassinari added bug 🐛 Something doesn't work component: autocomplete This is the name of the generic UI component, not the React module! and removed status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels Oct 14, 2020
@oliviertassinari
Copy link
Member

oliviertassinari commented Oct 14, 2020

@jiggum The proposed solution sounds great. Do you want to submit a pull request for it :)?

I had a look at what the others are doing:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something doesn't work component: autocomplete This is the name of the generic UI component, not the React module! ready to take Help wanted. Guidance available. There is a high chance the change will be accepted
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants