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

Issue 712873 link

Starred by 2 users

Issue metadata

Status: Verified
Owner:
Last visit > 30 days ago
Closed: Jul 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 1
Type: Bug


Participants' hotlists:
Fixing-touch


Sign in to add a comment

Unable to enter input text with on-screen keyboard on supervised user creation.

Project Member Reported by abod...@chromium.org, Apr 18 2017

Issue description

Chrome OS 9460.1.0, 59.0.3071.8
Chrome OS Platform: Kevin
Network info: 

Please specify Cr-* of the system to which this bug/feature applies (add
the label below).

Steps To Reproduce:
1. Rotate device to tablet view
2. Click on " add supervised user" button at login screen
3. Click on the create supervised user button . 
4. Choose the manager for this supervised user (if the device have more than one user) 
5. Choose the manager for this user and enter password -> Next
6. Try to create a Supervised user account name/password with on-screen keyboard

Expected Result:
Should enter account name/password with on-screen keyboard.

Actual Result:
No input text with on-screen keyboard.

How frequently does this problem reproduce? (Always, sometimes, hard to
reproduce?)

What is the impact to the user, and is there a workaround? If so, what is
it?

Please provide any additional information below. Attach a screen shot or
log if possible.

For graphics-related bugs, please copy/paste the contents of the about:gpu
page at the end of this report.


 
Labels: -Pri-2 Pri-1
Owner: yhanada@chromium.org
Status: Assigned (was: Untriaged)

Comment 2 by oka@chromium.org, Apr 18 2017

Owner: oka@chromium.org
Reproduced using Linux.

Comment 3 by oka@chromium.org, Apr 18 2017

Status: Started (was: Assigned)

Comment 5 by oka@chromium.org, Apr 28 2017

event_router is not null.
event_router->GetActiveEngine(extension_id())
returns nullptr.

Comment 7 by oka@chromium.org, Apr 28 2017

Even though Enable [1] is called with "xkb:us::eng" after Initialize, and Disable 
 is never called, component_id_ is somehow empty in InputMethodEngine [4].


[1] https://cs.chromium.org/chromium/src/chrome/browser/ui/input_method/input_method_engine_base.cc?type=cs&l=328
[2] https://cs.chromium.org/chromium/src/chrome/browser/chromeos/input_method/input_method_engine.cc?type=cs&l=219

Comment 8 by oka@chromium.org, Apr 28 2017

After login, the active IME should change from the profile associated with Default user to the profile associatd with the login user.
However, the IME associated with event_router did't switch, and it's still the IME for the Default user. That's why the IME for the extension is not active.

VK c: ======================== Before login =============================
[1454:1454:0428/174414.930721:ERROR:input_method_engine.cc(219)] VK c:  extension_id: jkghodnilhceideoidjikpgommlajknk  active_component_id_:xkb:us::eng  profile_Default 0
[1454:1454:0428/174414.930981:ERROR:input_method_engine.cc(219)] VK c:  extension_id: jkghodnilhceideoidjikpgommlajknk  active_component_id_:xkb:us::eng  profile_Default 0
[1454:1454:0428/174415.257882:ERROR:input_method_engine.cc(219)] VK c:  extension_id: jkghodnilhceideoidjikpgommlajknk  active_component_id_:xkb:us::eng  profile_Default 0
[1454:1454:0428/174415.585277:ERROR:input_method_engine_base.cc(341)] VK c: InputMethodEngineBase::Disable  extension_id_: jkghodnilhceideoidjikpgommlajknk  profile_Default 0
[1454:1454:0428/174417.241432:ERROR:input_method_engine_base.cc(181)] VK c: Initialize  extension_id: jkghodnilhceideoidjikpgommlajknk  profile_u-oka@google.com-hash 0
[1454:1454:0428/174417.241475:ERROR:input_method_engine_base.cc(331)] VK c: InputMethodEngineBase::Enable  extension_id_: jkghodnilhceideoidjikpgommlajknk  component_id: xkb:us::eng  profile_u-oka@google.com-hash 0
[1454:1454:0428/174417.242385:ERROR:input_method_engine.cc(219)] VK c:  extension_id: jkghodnilhceideoidjikpgommlajknk  active_component_id_:xkb:us::eng  profile_u-oka@google.com-hash 0
[1454:1454:0428/174417.416752:ERROR:input_method_engine_base.cc(181)] VK c: Initialize  extension_id: gjaehgfemfahhmlgpdfknkhdnemmolop  profile_u-oka@google.com-hash 0
[1454:1454:0428/174417.680793:ERROR:input_method_engine.cc(219)] VK c:  extension_id: jkghodnilhceideoidjikpgommlajknk  active_component_id_:xkb:us::eng  profile_u-oka@google.com-hash 0
[1454:1454:0428/174417.680835:ERROR:input_method_engine.cc(219)] VK c:  extension_id: jkghodnilhceideoidjikpgommlajknk  active_component_id_:xkb:us::eng  profile_u-oka@google.com-hash 0
[1454:1454:0428/174417.878281:ERROR:input_method_engine.cc(219)] VK c:  extension_id: jkghodnilhceideoidjikpgommlajknk  active_component_id_:  profile_Default 0
[1454:1454:0428/174418.256680:ERROR:input_ime_api_chromeos.cc(356)] VK c: GetActiveEngine  extension_id: gjaehgfemfahhmlgpdfknkhdnemmolop
[1454:1454:0428/174418.256694:ERROR:input_method_engine.cc(219)] VK c:  extension_id: gjaehgfemfahhmlgpdfknkhdnemmolop  active_component_id_:  profile_u-oka@google.com-hash 0
[1454:1454:0428/174418.256710:ERROR:input_ime_api_chromeos.cc(365)] VK c: engine not active.
[1454:1454:0428/174418.256717:ERROR:input_method_engine.cc(219)] VK c:  extension_id: gjaehgfemfahhmlgpdfknkhdnemmolop  active_component_id_:  profile_u-oka@google.com-hash 0
[1454:1454:0428/174418.257360:ERROR:input_ime_api_chromeos.cc(356)] VK c: GetActiveEngine  extension_id: jkghodnilhceideoidjikpgommlajknk
[1454:1454:0428/174418.257372:ERROR:input_method_engine.cc(219)] VK c:  extension_id: jkghodnilhceideoidjikpgommlajknk  active_component_id_:xkb:us::eng  profile_u-oka@google.com-hash 0
[1454:1454:0428/174418.257383:ERROR:input_method_engine.cc(219)] VK c:  extension_id: jkghodnilhceideoidjikpgommlajknk  active_component_id_:xkb:us::eng  profile_u-oka@google.com-hash 0
[1454:1454:0428/174418.257393:ERROR:input_method_engine_base.cc(331)] VK c: InputMethodEngineBase::Enable  extension_id_: jkghodnilhceideoidjikpgommlajknk  component_id: xkb:us::eng  profile_u-oka@google.com-hash 0
[1454:1454:0428/174418.257423:ERROR:input_method_engine.cc(219)] VK c:  extension_id: jkghodnilhceideoidjikpgommlajknk  active_component_id_:xkb:us::eng  profile_u-oka@google.com-hash 0
[1454:1454:0428/174418.334706:ERROR:input_method_engine.cc(219)] VK c:  extension_id: jkghodnilhceideoidjikpgommlajknk  active_component_id_:xkb:us::eng  profile_u-oka@google.com-hash 0
[1454:1454:0428/174418.340805:ERROR:input_method_engine.cc(219)] VK c:  extension_id: jkghodnilhceideoidjikpgommlajknk  active_component_id_:xkb:us::eng  profile_u-oka@google.com-hash 0
[1454:1454:0428/174421.313499:ERROR:input_method_engine.cc(219)] VK c:  extension_id: jkghodnilhceideoidjikpgommlajknk  active_component_id_:  profile_Default 0
[1454:1454:0428/174421.465980:ERROR:input_method_engine.cc(219)] VK c:  extension_id: jkghodnilhceideoidjikpgommlajknk  active_component_id_:  profile_Default 0

Comment 9 by oka@chromium.org, Apr 28 2017

Cc: azurewei@chromium.org
CC: azurewei@

On supervised user creation, after user login, InputImeEventRouter created with GetInputImeEventRouter still returns the IME associated with the "Default" user, instead of the logged in user.
I think it's not WAI, and it leads to virtual keyboard not working correctly.

Could you advice how to fix this?

Comment 10 by oka@chromium.org, May 2 2017

I think the root cause is VK is not re-created after the profile switches.
After the profile switch, the extension is still associated with the old (Default) profile.

Comment 11 by oka@chromium.org, May 2 2017

Keyboard should be recreated with Shell::CreateKeyboard per user login/logout, because the keyboard extensions are associated with the active user when the function is called [1]. If the keyboard were associated with a previous user, it in turn associated with an inactive IME and chrome.input.ime.sendKeyEvents does nothing.

Currently keyboard is recreated in Shell::OnSessionStateChanged when the session state becomes ACTIVE.
However, on the supervised user creation window in question, the session state is not ACTIVE, but LOGGED_IN_NOT_ACITVE, which corresponds to the state where the user has logged in but the login UI is not hidden yet. That's why the keyboard was not working there.

I think the function call of CreateKeyboard should be moved from OnSessionStateChanged to OnLoginStatusChanged, which should be called on every login/logout, which is exactly the timing when VK should be recreated.

[1] https://cs.chromium.org/chromium/src/chrome/browser/ui/ash/chrome_shell_delegate.cc?type=cs&sq=package:chromium&l=591

Comment 12 by oka@chromium.org, May 2 2017

Actually OnLoginStatusChanged doesn't work. Because LOGGED_IN_NOT_ACITVE is treated as NOT_LOGGED_IN,  i.e. no login status change.
https://cs.chromium.org/chromium/src/ash/session/session_controller.cc?type=cs&q=%22NOT_ACTIVE%22&sq=package:chromium&l=315

Comment 13 by oka@chromium.org, May 2 2017

I tried to replace ACTIVE to LOGGED_IN_NOT_ACITVE in Shell::OnSessionStateChanged. However then VK didn't work on guest mode, because for guest mode the session state is directly set to ACTIVE without passing through LOGGED_IN_NOT_ACTIVE.

Comment 14 by oka@chromium.org, May 2 2017

Sent https://codereview.chromium.org/2852403002/ to review.
Cc: shuchen@chromium.org
Project Member

Comment 16 by bugdroid1@chromium.org, Jun 18 2017

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

commit e82281ac05b7c0571c8f3c603487f74b686547f9
Author: Keigo Oka <oka@chromium.org>
Date: Sun Jun 18 23:25:34 2017

Ash: Inline InitKeyboard, and make the caller of it call CreateKeyboard.

InitKeyboard creates a keyboard controller but doesn't associate it with any
root window controller. It's potentially problematic if
keyboard::ShowKeyboard is called before RootWindowController::ActivateKeyboard.

Bug:  712873 

Change-Id: I5b34cd6f8b9e1b0736b5d91880e3aedc9d57970c
Reviewed-on: https://chromium-review.googlesource.com/535221
Reviewed-by: Mitsuru Oshima <oshima@chromium.org>
Commit-Queue: Keigo Oka <oka@chromium.org>
Cr-Commit-Position: refs/heads/master@{#480313}
[modify] https://crrev.com/e82281ac05b7c0571c8f3c603487f74b686547f9/ash/root_window_controller.cc
[modify] https://crrev.com/e82281ac05b7c0571c8f3c603487f74b686547f9/ash/shell.cc
[modify] https://crrev.com/e82281ac05b7c0571c8f3c603487f74b686547f9/ash/shell.h

Comment 17 by oka@chromium.org, Jun 20 2017

Status: Fixed (was: Started)

Comment 18 by oka@chromium.org, Jun 20 2017

Labels: Merge-Request-60
Status: Assigned (was: Fixed)
I'd like to merge  https://chromium.googlesource.com/chromium/src.git/+/e82281ac05b7c0571c8f3c603487f74b686547f9 to M60.
Project Member

Comment 19 by sheriffbot@chromium.org, Jun 20 2017

Labels: -Merge-Request-60 Hotlist-Merge-Review Merge-Review-60
This bug requires manual review: M60 has already been promoted to the beta branch, so this requires manual review
Please contact the milestone owner if you have questions.
Owners: amineer@(Android), cmasso@(iOS), josafat@(ChromeOS), bustamante@(Desktop)

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot

Comment 20 by oka@chromium.org, Jun 20 2017

Cc: josa...@chromium.org
josafat@
Could you review a change to be merged to M60? The change will fix the bug that virtual keyboard doesn't work on supervised user creation UI.

Labels: -M-59 -Merge-Review-60 M-60 Merge-Approved-60
Project Member

Comment 22 by sheriffbot@chromium.org, Jun 26 2017

This issue has been approved for a merge. Please merge the fix to any appropriate branches as soon as possible!

If all merges have been completed, please remove any remaining Merge-Approved labels from this issue.

Thanks for your time! To disable nags, add the Disable-Nags label.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot

Comment 23 by oka@chromium.org, Jun 29 2017

Labels: -Merge-Approved-60 Merge-Request-60
josafat@ May I merge https://codereview.chromium.org/2852403002/ too?

I don't know why the change is not associated with this bug, but it is what actually fixes the issue.

Project Member

Comment 24 by sheriffbot@chromium.org, Jun 29 2017

Labels: -Merge-Request-60 Merge-Review-60
This bug requires manual review: M60 has already been promoted to the beta branch, so this requires manual review
Please contact the milestone owner if you have questions.
Owners: amineer@(Android), cmasso@(iOS), josafat@(ChromeOS), bustamante@(Desktop)

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Project Member

Comment 25 by bugdroid1@chromium.org, Jun 29 2017

Labels: merge-merged-3112
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/9d3867c09566a7e9f3eae92524db0237c14b0c94

commit 9d3867c09566a7e9f3eae92524db0237c14b0c94
Author: Keigo Oka <oka@chromium.org>
Date: Thu Jun 29 18:44:52 2017

Ash: Inline InitKeyboard, and make the caller of it call CreateKeyboard.

InitKeyboard creates a keyboard controller but doesn't associate it with any
root window controller. It's potentially problematic if
keyboard::ShowKeyboard is called before RootWindowController::ActivateKeyboard.

Bug:  712873 

Change-Id: I5b34cd6f8b9e1b0736b5d91880e3aedc9d57970c
Reviewed-on: https://chromium-review.googlesource.com/535221
Reviewed-by: Mitsuru Oshima <oshima@chromium.org>
Commit-Queue: Keigo Oka <oka@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#480313}
Review-Url: https://codereview.chromium.org/2964083002 .
Cr-Commit-Position: refs/branch-heads/3112@{#492}
Cr-Branched-From: b6460e24cf59f429d69de255538d0fc7a425ccf9-refs/heads/master@{#474897}

[modify] https://crrev.com/9d3867c09566a7e9f3eae92524db0237c14b0c94/ash/root_window_controller.cc
[modify] https://crrev.com/9d3867c09566a7e9f3eae92524db0237c14b0c94/ash/shell.cc
[modify] https://crrev.com/9d3867c09566a7e9f3eae92524db0237c14b0c94/ash/shell.h

Project Member

Comment 26 by bugdroid1@chromium.org, Jun 29 2017

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

commit 366c34997d1699cb386ff852d6d333f10f141299
Author: oka <oka@chromium.org>
Date: Thu Jun 29 19:01:09 2017

Revert of Ash: Inline InitKeyboard, and make the caller of it call CreateKeyboard. (patchset #1 id:1 of https://codereview.chromium.org/2964083002/ )

Reason for revert:
I resolved a merge conflict in a wrong way, and it wouldn't compile.

Original issue's description:
> Ash: Inline InitKeyboard, and make the caller of it call CreateKeyboard.
>
> InitKeyboard creates a keyboard controller but doesn't associate it with any
> root window controller. It's potentially problematic if
> keyboard::ShowKeyboard is called before RootWindowController::ActivateKeyboard.
>
> Bug:  712873 
>
> Change-Id: I5b34cd6f8b9e1b0736b5d91880e3aedc9d57970c
> Reviewed-on: https://chromium-review.googlesource.com/535221
> Reviewed-by: Mitsuru Oshima <oshima@chromium.org>
> Commit-Queue: Keigo Oka <oka@chromium.org>
> Cr-Original-Commit-Position: refs/heads/master@{#480313}
> Review-Url: https://codereview.chromium.org/2964083002 .
> Cr-Commit-Position: refs/branch-heads/3112@{#492}
> Cr-Branched-From: b6460e24cf59f429d69de255538d0fc7a425ccf9-refs/heads/master@{#474897}
> Committed: https://chromium.googlesource.com/chromium/src/+/9d3867c09566a7e9f3eae92524db0237c14b0c94

TBR=
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Review-Url: https://codereview.chromium.org/2969483002
Cr-Commit-Position: refs/branch-heads/3112@{#493}
Cr-Branched-From: b6460e24cf59f429d69de255538d0fc7a425ccf9-refs/heads/master@{#474897}

[modify] https://crrev.com/366c34997d1699cb386ff852d6d333f10f141299/ash/root_window_controller.cc
[modify] https://crrev.com/366c34997d1699cb386ff852d6d333f10f141299/ash/shell.cc
[modify] https://crrev.com/366c34997d1699cb386ff852d6d333f10f141299/ash/shell.h

Project Member

Comment 27 by bugdroid1@chromium.org, Jun 29 2017

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

commit 0b1b723c301e612c809a502f028dfc0fbba6be21
Author: oka@chromium.org <oka@chromium.org>
Date: Thu Jun 29 21:00:15 2017

Ash: Inline InitKeyboard, and make the caller of it call CreateKeyboard.

InitKeyboard creates a keyboard controller but doesn't associate it with any
root window controller. It's potentially problematic if
keyboard::ShowKeyboard is called before RootWindowController::ActivateKeyboard.

Bug:  712873 

Change-Id: I5b34cd6f8b9e1b0736b5d91880e3aedc9d57970c
Reviewed-on: https://chromium-review.googlesource.com/535221
Reviewed-by: Mitsuru Oshima <oshima@chromium.org>
Commit-Queue: Keigo Oka <oka@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#480313}
Review-Url: https://codereview.chromium.org/2965503003 .
Cr-Commit-Position: refs/branch-heads/3112@{#494}
Cr-Branched-From: b6460e24cf59f429d69de255538d0fc7a425ccf9-refs/heads/master@{#474897}

[modify] https://crrev.com/0b1b723c301e612c809a502f028dfc0fbba6be21/ash/root_window_controller.cc
[modify] https://crrev.com/0b1b723c301e612c809a502f028dfc0fbba6be21/ash/shell.cc
[modify] https://crrev.com/0b1b723c301e612c809a502f028dfc0fbba6be21/ash/shell.h

Comment 28 by oka@chromium.org, Jul 3 2017

josafat@
Friendly ping.
May I merge https://codereview.chromium.org/2852403002/ too?

Comment 29 by oka@chromium.org, Jul 6 2017

Labels: -Merge-Review-60 Merge-Request-60
Project Member

Comment 30 by sheriffbot@chromium.org, Jul 6 2017

Labels: -Merge-Request-60 Merge-Review-60
This bug requires manual review: M60 has already been promoted to the beta branch, so this requires manual review
Please contact the milestone owner if you have questions.
Owners: amineer@(Android), cmasso@(iOS), josafat@(ChromeOS), bustamante@(Desktop)

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Labels: -Merge-Review-60 Merge-Approved-60
Merge approved for 60. 
Project Member

Comment 32 by bugdroid1@chromium.org, Jul 11 2017

Labels: -merge-approved-60
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/eebdec6222486e1160592cb19cff709c86c77783

commit eebdec6222486e1160592cb19cff709c86c77783
Author: oka@chromium.org <oka@chromium.org>
Date: Tue Jul 11 13:30:18 2017

Make virtual keyboard work on supervised user creation

Keyboard should be recreated with Shell::CreateKeyboard per user sign
in/out so to associate the new user to keyboard extensions. If the
keyboard extensions were associated with the previous user, it in turn
associated with an inactive IME and thus chrome.input.ime.sendKeyEvents
does nothing.

Currently the keyboard is recreated in Shell::OnSessionStateChanged when
the session state becomes ACTIVE. However, on the supervised user
creation window, the session state is not ACTIVE, but
LOGGED_IN_NOT_ACTIVE, which represents the state where the user
has signed in but the login UI is not hidden yet.
That's why virtual keyboard was not working there.

This CL fixes the issue by recreating the keyboard on LOGGED_IN_NOT_ACTIVE
too.

BUG= 712873 
TEST=Added unit test. Manually tested VK works:
- on supervised user creation window
- after multiprofile switch

TBR=oka@chromium.org

(cherry picked from commit c21941d2b11067e23073143692fe5968af3875f7)

Review-Url: https://codereview.chromium.org/2852403002
Cr-Original-Commit-Position: refs/heads/master@{#480878}
Change-Id: I915f7dd772810fed6bcbd5ddb0e30ea5fcaa2c0a
Reviewed-on: https://chromium-review.googlesource.com/566982
Reviewed-by: Keigo Oka <oka@chromium.org>
Cr-Commit-Position: refs/branch-heads/3112@{#582}
Cr-Branched-From: b6460e24cf59f429d69de255538d0fc7a425ccf9-refs/heads/master@{#474897}
[modify] https://crrev.com/eebdec6222486e1160592cb19cff709c86c77783/ash/shell.cc
[modify] https://crrev.com/eebdec6222486e1160592cb19cff709c86c77783/ash/shell_unittest.cc

Comment 33 by oka@chromium.org, Jul 12 2017

Status: Fixed (was: Assigned)
Cc: -rookrishna@chromium.org mkarkada@chromium.org
Status: Verified (was: Fixed)
Verified on Chrome OS 9592.71.0, 60.0.3112.80 stable build

Sign in to add a comment