Bug 208549 - Web Inspector: AXI: can't leave Styles and Computed panels by pressing Tab
Summary: Web Inspector: AXI: can't leave Styles and Computed panels by pressing Tab
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: WebKit Nightly Build
Hardware: All All
: P2 Normal
Assignee: Nikita Vasilyev
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2020-03-03 17:04 PST by Nikita Vasilyev
Modified: 2020-03-05 16:47 PST (History)
4 users (show)

See Also:


Attachments
Patch (3.15 KB, patch)
2020-03-03 17:18 PST, Nikita Vasilyev
hi: review+
Details | Formatted Diff | Diff
Patch (3.24 KB, patch)
2020-03-05 16:28 PST, Nikita Vasilyev
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Nikita Vasilyev 2020-03-03 17:04:14 PST
Once the focus is inside of the Styles or Computed panel, it's trapped there. You can't escape the panel by pressing Tab. Focus cycles inside the panel.


Steps:
1. Open Styles panel.
2. Focus on the filter field at the bottom of the sidebar.
3. Press Tab.

Expected:
Focus moves forward to "Classes" toggle button.

Actual:
Focus "cycles" back to the top of the sidebar - to the "Active" checkbox.


Steps:
1. Focus on the first checkbox - "Active".
2. Press Shift-Tab.

Expected:
Focus moves to "Styles" sidebar tab.

Actual:
Focus moves to the filter field at the bottom of the sidebar.
Comment 1 Radar WebKit Bug Importer 2020-03-03 17:04:34 PST
<rdar://problem/60020149>
Comment 2 Nikita Vasilyev 2020-03-03 17:18:59 PST
Created attachment 392354 [details]
Patch
Comment 3 Devin Rousso 2020-03-05 16:19:40 PST
Comment on attachment 392354 [details]
Patch

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

r=me

> Source/WebInspectorUI/UserInterface/Views/GeneralStyleDetailsSidebarPanel.js:419
> +        if (event.shiftKey && this._panel.focusLastSection) {

Why not mimic `_handleForcedPseudoClassCheckboxKeydown` and have `if (event.key !== "Tab" || !event.shiftKey)` instead?  That way, `if (this._panel.focusLastSection)` lines up quite nicely with the `this._panel.focusLastSection();` on the next line :)
Comment 4 Nikita Vasilyev 2020-03-05 16:28:38 PST
Created attachment 392645 [details]
Patch
Comment 5 WebKit Commit Bot 2020-03-05 16:47:03 PST
Comment on attachment 392645 [details]
Patch

Clearing flags on attachment: 392645

Committed r257959: <https://trac.webkit.org/changeset/257959>
Comment 6 WebKit Commit Bot 2020-03-05 16:47:05 PST
All reviewed patches have been landed.  Closing bug.