New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 681563 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Jun 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 1
Type: Bug

Blocking:
issue 672585
issue 837710



Sign in to add a comment

IME for Mus: Changing focused TextInputClient to nullptr.

Project Member Reported by moshayedi@chromium.org, Jan 16 2017

Issue description

This should probably cancel the active session.
 

Comment 1 by sky@chromium.org, Jul 24 2017

Owner: e...@chromium.org

Comment 2 by e...@chromium.org, Sep 12 2017

Owner: thanhph@chromium.org
More IME bugs.
Components: -Internals>MUS Internals>Services>WindowService
Components: -MUS

Comment 5 by xiy...@chromium.org, May 24 2018

Blocking: 837710
Cc: thanhph@chromium.org
Components: UI>Input>Text>IME
Labels: OS-Chrome
Owner: xiy...@chromium.org
I will look at since while working on  issue 837710 . We need to be able to switch back and forth between windows from various source (browser and mojo apps) and handle the focus change properly.

Right now, the IMEEngine does not handle InputMethodChromeOS in InputMethodBridge and the default one in the browser process correctly. As a result, the last focused mojo app has its InputMethodChromeOS stays active and takes focus away from browser window when IMEEngine update composition in the wrong InputMethodChromeOS.
Is WindowTreeHostMus::OnActivationChanged() called as expected?

Comment 7 by xiy...@chromium.org, May 29 2018

Yes. The problem is actually not with IME Mus, but with ash's shared/singleton IME, which does not get OnFocus/OnBlur calls. It is expected in old days because it is the only IME on ChromeOS before. But this is no longer the case with ws2. I would fix the problem for that with  issue 837710 .

For this bug, it seems we should be fine just closing the mojo connection to release the associated InputMethodBridge when lost focus.
Project Member

Comment 8 by bugdroid1@chromium.org, Jun 1 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/5f1046eedd0023f22789d32b0102eb1a2f47ec91

commit 5f1046eedd0023f22789d32b0102eb1a2f47ec91
Author: Xiyuan Xia <xiyuan@chromium.org>
Date: Fri Jun 01 16:04:44 2018

ws2: Handle IME focus change

- Add a ImeFocusHandler to call OnFocus/OnBlur on ash's singleton
  IME when focus moves back and forth between ash windows and
  ClientWindows;
- InputMethodMus closes mojo pipes when focus moves out of it;
- InputMethodBridge skips IME calls when its IME is not the currently
  active one to filter out asynchrouns mojo calls that comes in
  after its IME is deactivated;

Bug:  837710 ,  681563 
Change-Id: I70f426e331f0d29390bd8510a6dc809d0d698152
Reviewed-on: https://chromium-review.googlesource.com/1080015
Commit-Queue: Xiyuan Xia <xiyuan@chromium.org>
Reviewed-by: Scott Violet <sky@chromium.org>
Cr-Commit-Position: refs/heads/master@{#563658}
[modify] https://crrev.com/5f1046eedd0023f22789d32b0102eb1a2f47ec91/ash/BUILD.gn
[add] https://crrev.com/5f1046eedd0023f22789d32b0102eb1a2f47ec91/ash/ime/ime_focus_handler.cc
[add] https://crrev.com/5f1046eedd0023f22789d32b0102eb1a2f47ec91/ash/ime/ime_focus_handler.h
[add] https://crrev.com/5f1046eedd0023f22789d32b0102eb1a2f47ec91/ash/ime/ime_focus_handler_unittest.cc
[modify] https://crrev.com/5f1046eedd0023f22789d32b0102eb1a2f47ec91/ash/shell.cc
[modify] https://crrev.com/5f1046eedd0023f22789d32b0102eb1a2f47ec91/ash/shell.h
[modify] https://crrev.com/5f1046eedd0023f22789d32b0102eb1a2f47ec91/chrome/browser/ui/views/ime_driver/input_method_bridge_chromeos.cc
[modify] https://crrev.com/5f1046eedd0023f22789d32b0102eb1a2f47ec91/services/ui/ws2/window_service.cc
[modify] https://crrev.com/5f1046eedd0023f22789d32b0102eb1a2f47ec91/services/ui/ws2/window_service.h
[modify] https://crrev.com/5f1046eedd0023f22789d32b0102eb1a2f47ec91/ui/aura/mus/input_method_mus.cc
[modify] https://crrev.com/5f1046eedd0023f22789d32b0102eb1a2f47ec91/ui/base/ime/input_method_chromeos.cc

Status: Fixed (was: Assigned)
#6 resets the mojo connection when InputMethodMus loses focus.
Status: Assigned (was: Fixed)
Turns out that resetting the mojo connection has some side effect that affect the input events order. Re-open to handle the focus change without resetting the mojo channel.
Project Member

Comment 11 by bugdroid1@chromium.org, Jun 6 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/81624da0970e057744db192948e5b296228fb651

commit 81624da0970e057744db192948e5b296228fb651
Author: Scott Violet <sky@chromium.org>
Date: Wed Jun 06 23:43:25 2018

chromeos: make InputMethodMus ack events when resetting connection

Now that we reset the connection when nothing is focused we need to ack
any pending events.

BUG= 681563 
TEST=covered by test

Change-Id: I1fc3219a04a49f911434ea8def7d9eca223c4ab6
Reviewed-on: https://chromium-review.googlesource.com/1089885
Reviewed-by: Xiyuan Xia <xiyuan@chromium.org>
Commit-Queue: Scott Violet <sky@chromium.org>
Cr-Commit-Position: refs/heads/master@{#565100}
[modify] https://crrev.com/81624da0970e057744db192948e5b296228fb651/services/ui/ws2/window_service_client.cc
[modify] https://crrev.com/81624da0970e057744db192948e5b296228fb651/ui/aura/mus/input_method_mus.cc
[modify] https://crrev.com/81624da0970e057744db192948e5b296228fb651/ui/aura/mus/input_method_mus_unittest.cc

Comment 12 by sky@chromium.org, Jun 6 2018

Status: Fixed (was: Assigned)
Moving back to fixed.

Sign in to add a comment