IME composition ReactSafari open

Safari: Enter confirming a CJK @-mention picks the wrong option (rc-mentions)

Confirming a CJK @-mention with Enter replaces it with the highlighted option (Safari)

rc-mentions · react-component/mentions

Symptom

On Safari/WebKit, composing an @-mention name in CJK and pressing Enter to confirm the IME replaces the text with whatever mention is highlighted.

Minimal repro
1. In Safari, type @ then compose a Japanese name with the IME.
2. Press Enter to confirm the kanji conversion.
3. The composing text is replaced by the highlighted mention option.
Fix

In the ENTER branch, return early on event.nativeEvent.isComposing before preventDefault. WebKit reports the commit keydown as which===Enter + isComposing:true; Chromium reports keyCode 229 and never enters this branch.

Fix PR → #rc-mentions-safari-ime-select

Also in: React

← all 93 entries