Bug 157713 - Web Inspector: unable to switch between navigation tree outlines using up/down arrow keys
Summary: Web Inspector: unable to switch between navigation tree outlines using up/dow...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: WebKit Local Build
Hardware: All All
: P2 Normal
Assignee: Matt Baker
URL:
Keywords: InRadar
Depends on: 157813
Blocks:
  Show dependency treegraph
 
Reported: 2016-05-14 13:56 PDT by BJ Burg
Modified: 2016-05-18 20:20 PDT (History)
8 users (show)

See Also:


Attachments
[Video] New keyboard navigation behavior (690.24 KB, video/mp4)
2016-05-17 18:46 PDT, Matt Baker
no flags Details
[Patch] Proposed Fix (5.24 KB, patch)
2016-05-17 21:08 PDT, Matt Baker
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description BJ Burg 2016-05-14 13:56:59 PDT
STEPS TO REPRODUCE:

Open the debugger tab
Select "All Uncaught Exceptions"
Press arrow key down

EXPECTED:

The root of the next tree outline "Sources" should become selected, or its first child.

ACTUAL:

Nothing happens.
Comment 1 Radar WebKit Bug Importer 2016-05-14 13:57:12 PDT
<rdar://problem/26287086>
Comment 2 Matt Baker 2016-05-17 12:32:09 PDT
Let's make better use of the tree outline tab order, instead of adding non-standard keyboard navigation behavior. Tab/Shift+Tab currently changes the focus between the two trees, but doesn't update the selection.

We should remember the selection when a tree loses focus, and reselect it when it gains the focus back.
Comment 3 Matt Baker 2016-05-17 18:46:14 PDT
Created attachment 279197 [details]
[Video] New keyboard navigation behavior
Comment 4 Matt Baker 2016-05-17 21:08:44 PDT
Created attachment 279210 [details]
[Patch] Proposed Fix
Comment 5 Timothy Hatcher 2016-05-18 07:42:08 PDT
Comment on attachment 279210 [details]
[Patch] Proposed Fix

View in context: https://bugs.webkit.org/attachment.cgi?id=279210&action=review

> Source/WebInspectorUI/UserInterface/Views/NavigationSidebarPanel.js:159
> +        contentTreeOutline.element.addEventListener("focus", this._contentTreeOutlineDidFocus, this);
> +
> +        // FIXME Remove ContentTreeOutlineSymbol once <https://webkit.org/b/157825> is finished.
> +        contentTreeOutline.element[WebInspector.NavigationSidebarPanel.ContentTreeOutlineSymbol] = contentTreeOutline;

This might be better handled in TreeOutline.js, and add a new focus event.

> Source/WebInspectorUI/UserInterface/Views/NavigationSidebarPanel.js:678
> +        // Prevent two selections in the sidebar, if the selected tree outline is changing.
> +        let treeOutline = selectedElement.treeOutline;
> +        if (this._selectedContentTreeOutline && this._selectedContentTreeOutline !== treeOutline)
> +            this._selectedContentTreeOutline.selectedTreeElement.deselect();

I thought navigation sidebar panel handled this now?
Comment 6 Matt Baker 2016-05-18 07:55:25 PDT
Comment on attachment 279210 [details]
[Patch] Proposed Fix

View in context: https://bugs.webkit.org/attachment.cgi?id=279210&action=review

>> Source/WebInspectorUI/UserInterface/Views/NavigationSidebarPanel.js:159
>> +        contentTreeOutline.element[WebInspector.NavigationSidebarPanel.ContentTreeOutlineSymbol] = contentTreeOutline;
> 
> This might be better handled in TreeOutline.js, and add a new focus event.

Trees usually wouldn't lose their selection on blur, so I'm not sure this applies to tree outline's in general.

>> Source/WebInspectorUI/UserInterface/Views/NavigationSidebarPanel.js:678
>> +            this._selectedContentTreeOutline.selectedTreeElement.deselect();
> 
> I thought navigation sidebar panel handled this now?

That's still the case. It's been simplified to use _selectedContentTreeOutline instead of checking every content tree outline.
Comment 7 WebKit Commit Bot 2016-05-18 20:20:05 PDT
Comment on attachment 279210 [details]
[Patch] Proposed Fix

Clearing flags on attachment: 279210

Committed r201125: <http://trac.webkit.org/changeset/201125>
Comment 8 WebKit Commit Bot 2016-05-18 20:20:11 PDT
All reviewed patches have been landed.  Closing bug.