Skip to content

Conversation

@jinjor
Copy link

@jinjor jinjor commented Jan 27, 2018

This is a problem specific to a particular situation.

Japanese text are input by pressing Enter key twice.

  1. Choose correct letters
  2. 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).

screen shot 2018-01-27 at 23 10 15

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant