pacocoursey / cmdk

Fast, unstyled command menu React component.
https://cmdk.paco.me
MIT License
9.04k stars 259 forks source link

IME composition check is not working on Safari(Japanese). #206

Closed dninomiya closed 5 months ago

dninomiya commented 5 months ago

The current IME state check does not work with the combination of Safari and Japanese. It needs to be modified as follows. Your consideration would be greatly appreciated. Please refer to the following site for detailed background.

https://dninomiya.github.io/form-guide/stop-enter-submit

Recommended Solution

It can be resolved by changing just one line.

// not working for Safari (Japanese)
if (!e.nativeEvent.isComposing) {

// ✅
if (!e.nativeEvent.isComposing && e.keyCode !== 229) {

Thank you for your support!

pacocoursey commented 5 months ago

Thanks for reporting!

dninomiya commented 5 months ago

@pacocoursey Thank you!