This is a problem specific to a particular situation.
Japanese text are input by pressing Enter key twice.
Choose correct letters
Finish editing
The problem is that onEnter handles event on the timing (1) instead of (2).
For example, when we Japanese type kansuu, there are many way to express it. (1) Show kansuu directly (2) convert to かんすう (3) convert to 関数 (4) convert to 巻数... This functionality is called IME (Input Method Editor).
When we want to input "関数って最高だよね", we first type kansuu and then choose 関数 using Enter key. Now we haven't finished inputting the whole text yet, but onEnter event is unexpectedly emitted.
As far as I know, using keypress instead of keyup solves this problem. But I'm not sure if this change causes any downside or not. I will really appreciate if someone could review this.
This is a problem specific to a particular situation.
Japanese text are input by pressing Enter key twice.
The problem is that
onEnter
handles event on the timing (1) instead of (2).For example, when we Japanese type
kansuu
, there are many way to express it. (1) Showkansuu
directly (2) convert toかんすう
(3) convert to関数
(4) convert to巻数
... This functionality is called IME (Input Method Editor).When we want to input "関数って最高だよね", we first type
kansuu
and then choose関数
using Enter key. Now we haven't finished inputting the whole text yet, butonEnter
event is unexpectedly emitted.As far as I know, using
keypress
instead ofkeyup
solves this problem. But I'm not sure if this change causes any downside or not. I will really appreciate if someone could review this.