green-creeper
green-creeper

Reputation: 316

Enter on IME menu in IE, triggers keyup event on input

I have an input on web page, which triggers search my hitting enter.

On GWT it looks like this

box.addKeyUpHandler(new KeyUpHandler() {
  @Override
  public void onKeyUp(KeyUpEvent keyUpEvent) {
    if (keyUpEvent.getNativeKeyCode() == KeyCodes.KEY_ENTER) {
      client.executeSearch();
    }
  }
});

When user from Japan uses IME:

He enters a word, hits space twice and sees a menu where he needs to chose the desired spelling. Menu looks like this In Chrome and FF it works fine, but in IE, when user hits enter on desired spelling, keyUp handler on input is triggered.

So what I need is to preserve IE from triggering this ENTER on IME menu.

Any suggestions?

Upvotes: 0

Views: 393

Answers (1)

green-creeper
green-creeper

Reputation: 316

I switched KeyUpHandler to KeyDownHandler. As far as I understand, pop-up menu is hiding by KeyDown event, so KeyUp was triggered on text Input.

Upvotes: 1

Related Questions