New issue
Advanced search Search tips

Issue 920409 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Jan 16
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 3
Type: Bug



Sign in to add a comment

KSV lost focus after the first "tab"

Project Member Reported by wutao@chromium.org, Jan 9

Issue description

When opening KSV, the first focus is on search box.
On first "tab", the focus should be on side tabbed pane. However, we can see a refresh (the highlight color), the side tabbed pane lost focus.

This only happens on the first time. The "tab" works fine.
 
Cc: msw@chromium.org
Components: Internals>Views
Labels: shortcut
Found the reason that, in KSV, we only init the first category to show users and then init all categories in the background.

In the second init, we change the view hierarchy, which cause OnBlur. We should request focus again. 
Oh yeah, on that first [Tab] from textfield to the category tabs, focus on the tab is definitely lost. Adding a Focus after re-initializing the categories might be a decent workaround.

It might also make sense to investigate the loss of focus and avoid that altogether? Do we just replace the content of the tabs or the tab/category label views themselves?
Because I remove the tab in order to add new tab with updated content.
I will try to find a way to update the content directly.
Project Member

Comment 4 by bugdroid1@chromium.org, Jan 16

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

commit 6fde4b2013b8fd941df9aa337e77d39f7518d93c
Author: wutao <wutao@chromium.org>
Date: Wed Jan 16 01:19:30 2019

ksv: Update tab contents in the second init.

ksv inits the side tabs twice to reduce latency: first only inits the
default category to show users, and then inits all categories in the
background. However, in the second init, the view heirarchy changes,
which causes OnBlur on the Tab. This patch only updates the tab
contents in the second init in order to keep the focus.

Bug:  920409 
Test: manual.
Change-Id: Id8bdba5cd5ca38d6a8f8490029cfda756733c8ec
Reviewed-on: https://chromium-review.googlesource.com/c/1406239
Commit-Queue: Tao Wu <wutao@chromium.org>
Reviewed-by: Michael Wasserman <msw@chromium.org>
Cr-Commit-Position: refs/heads/master@{#622965}
[modify] https://crrev.com/6fde4b2013b8fd941df9aa337e77d39f7518d93c/ash/components/shortcut_viewer/views/keyboard_shortcut_view.cc

Comment 5 by wutao@chromium.org, Jan 16 (6 days ago)

Status: Fixed (was: Assigned)

Sign in to add a comment