ime: Fix message ordering bug when focusing quickly after enabling.
IME service always expects an OnInputMethodChanged message first, then an OnFocus. However, if we enable NativeInputMethodEngine and then immediately focus, it will send out OnFocus then OnInputMethodChanged. This is because OnInputMethodChanged is sent in an async callback, which may run after we send OnFocus. Move the code to send OnInputMethodChanged out of the callback and call it immediately after connecting to IME service. This is ok because Mojo will queue up any messages automatically if the IME service is not yet ready. Bug: b/172990698 Change-Id: I81bc0062f867131d0c8faf32411a845f676b5aeb Fixed: b/172990698 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2537443 Commit-Queue: Darren Shen <shend@chromium.org> Reviewed-by:My Nguyen <myy@chromium.org> Cr-Commit-Position: refs/heads/master@{#828044}
Showing
Please register or sign in to comment