Skip to content
This repository has been archived by the owner on Dec 23, 2022. It is now read-only.

Japanese IME Issue #304

Open
vvakame opened this issue Jan 21, 2020 · 6 comments
Open

Japanese IME Issue #304

vvakame opened this issue Jan 21, 2020 · 6 comments

Comments

@vvakame
Copy link

vvakame commented Jan 21, 2020

material-ui-chip-input is awesome library! thanks a lot.

so, I have some issue related Japanese IME.
Enter key has 2 means for Japanese IME user.

  1. input enter (same as ASCII user)
  2. confirm character convert

material-ui-chip-input can't handle pattern 2 correctly.
I think problem is maybe here

newChipKeyCodes: [13],
newChipKeys: ['Enter'],

pattern 1 and 2 have same key 'Enter'. but keyCode is different. 13 and 229.
so, I tried newChipKeys={[]} in my app. It's works fine (maybe...)

can we remove 'Enter' from newChipKeys?

related
#160
moroshko/react-autosuggest#388

@leMaik
Copy link
Member

leMaik commented Jan 21, 2020

so, I tried newChipKeys={[]} in my app. It's works fine (maybe...)

That would be the fix, but it's already possible to do that on the user side and a default of 'Enter' is a good thing for ASCII users. That said, ASCII users also have keyCode 13, so I'm not really sure what to do here.

Instead of changing the default value, maybe we should add a Japanese IME example. What do you think?

@vvakame
Copy link
Author

vvakame commented Jan 21, 2020

make sense.
Japanese user will search this github repository's issue with Japanese (or CJK), they will be find this issue. It's maybe useful already.
so, It might be even nicer if it was written in READMD.md. 😸

@leMaik
Copy link
Member

leMaik commented Jan 21, 2020

@vvakame Would you like to add an example to the storybook? :-)

@vvakame
Copy link
Author

vvakame commented Jan 22, 2020

okey, I'll try it & send PR 😸

I slept overnight and reconsidered.
I'm a Japanese IME user. but Library user (= app developer) is not CJK IME user almost.
so, I think provides better default settings that is good for all CJK IME user who uses this library via apps.

in react-autosuggest, they are not using event.key in there handler.
https://github.com/moroshko/react-autosuggest/blob/master/src/Autosuggest.js#L657

I think change default settings to newChipKeys:[] is maybe works fine in ASCII user.
but I don't know is it okay on other language's input method... 😿

@leMaik
Copy link
Member

leMaik commented Apr 26, 2020

I think change default settings to newChipKeys:[] is maybe works fine in ASCII user.
but I don't know is it okay on other language's input method... crying_cat_face

@vvakame Unfortunately (e.g. #309), that wouldn't solve the issue either.

@tk-r1d3r
Copy link

tk-r1d3r commented Sep 2, 2020

okey, I'll try it & send PR 😸

I slept overnight and reconsidered.
I'm a Japanese IME user. but Library user (= app developer) is not CJK IME user almost.
so, I think provides better default settings that is good for all CJK IME user who uses this library via apps.

in react-autosuggest, they are not using event.key in there handler.
https://github.com/moroshko/react-autosuggest/blob/master/src/Autosuggest.js#L657

I think change default settings to newChipKeys:[] is maybe works fine in ASCII user.
but I don't know is it okay on other language's input method... 😿

thats really helped me. thanks

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

No branches or pull requests

3 participants