Bug 190100 - Web Inspector: Table with no selection should select the first/last row on down/up arrow key
Summary: Web Inspector: Table with no selection should select the first/last row on do...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: WebKit Nightly Build
Hardware: All All
: P4 Normal
Assignee: Matt Baker
URL:
Keywords: InRadar
Depends on: 189718 190993
Blocks:
  Show dependency treegraph
 
Reported: 2018-09-28 17:04 PDT by Matt Baker
Modified: 2018-11-13 11:41 PST (History)
4 users (show)

See Also:


Attachments
WIP (2.24 KB, patch)
2018-09-28 17:12 PDT, Matt Baker
no flags Details | Formatted Diff | Diff
Patch (3.70 KB, patch)
2018-11-08 12:39 PST, Matt Baker
no flags Details | Formatted Diff | Diff
Patch (3.78 KB, patch)
2018-11-13 08:46 PST, Matt Baker
no flags Details | Formatted Diff | Diff
Patch for landing (3.74 KB, patch)
2018-11-13 11:04 PST, 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 Matt Baker 2018-09-28 17:04:26 PDT
Summary:
Table with no selected row should select the first/last row on down/up arrow key.

This improves behavior parity with macOS tables (Finder, Instruments, AppKit's NSTableView, etc).

Steps to Reproduce:
1. Open Network tab
2. Focus the table without selecting a row (click past the last row)
3. Press down (or up) arrow key
Actual:
  => Nothing happens
Expected:
  => First (or last) row is selected
Comment 1 Radar WebKit Bug Importer 2018-09-28 17:04:48 PDT
<rdar://problem/44879243>
Comment 2 Matt Baker 2018-09-28 17:12:22 PDT
Created attachment 351147 [details]
WIP
Comment 3 Matt Baker 2018-09-28 17:13:30 PDT
(In reply to Matt Baker from comment #2)
> Created attachment 351147 [details]
> WIP

Lacks support for when the first or last row is not in the cache.
Comment 4 Matt Baker 2018-11-08 12:39:33 PST
Created attachment 354264 [details]
Patch
Comment 5 Matt Baker 2018-11-13 08:46:42 PST
Created attachment 354672 [details]
Patch
Comment 6 Devin Rousso 2018-11-13 09:54:10 PST
Comment on attachment 354672 [details]
Patch

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

r=me

> Source/WebInspectorUI/UserInterface/Views/Table.js:454
> +        this.needsLayout();

If we wait for a layout rAF, we'll end up flashing content as we will scroll before the new content is visible.  I think this should be `updateLayout` if the row isn't currently visible, but it can stay as is for rows that are.

> Source/WebInspectorUI/UserInterface/Views/Table.js:1304
> +        if (event.metaKey || event.ctrlKey)
>              return;

Duplicate of next line.  Please remove.
Comment 7 Matt Baker 2018-11-13 11:04:10 PST
Created attachment 354682 [details]
Patch for landing
Comment 8 WebKit Commit Bot 2018-11-13 11:41:46 PST
Comment on attachment 354682 [details]
Patch for landing

Clearing flags on attachment: 354682

Committed r238139: <https://trac.webkit.org/changeset/238139>
Comment 9 WebKit Commit Bot 2018-11-13 11:41:48 PST
All reviewed patches have been landed.  Closing bug.