Bug 191510 - Web Inspector: Styles: Pressing Tab or Enter should start editing focused property
Summary: Web Inspector: Styles: Pressing Tab or Enter should start editing focused pro...
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
: 191135 (view as bug list)
Depends on:
Blocks:
 
Reported: 2018-11-10 17:44 PST by Nikita Vasilyev
Modified: 2018-11-13 13:46 PST (History)
5 users (show)

See Also:


Attachments
Patch (2.02 KB, patch)
2018-11-10 17:47 PST, Nikita Vasilyev
no flags Details | Formatted Diff | Diff
[animated GIF] With patch applied (87.46 KB, image/gif)
2018-11-10 17:49 PST, Nikita Vasilyev
no flags Details
Patch (1.79 KB, patch)
2018-11-11 20:08 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 2018-11-10 17:44:40 PST
When one or more properties are selected, pressing Tab or Enter key should start editing the first selected property.

Disabled (commented out) properties cannot be edited, so when the first selected property is disabled find the next enabled property and edit it instead.
Comment 1 Radar WebKit Bug Importer 2018-11-10 17:45:01 PST
<rdar://problem/45970897>
Comment 2 Nikita Vasilyev 2018-11-10 17:47:26 PST
Created attachment 354486 [details]
Patch
Comment 3 Nikita Vasilyev 2018-11-10 17:49:47 PST
Created attachment 354487 [details]
[animated GIF] With patch applied
Comment 4 Devin Rousso 2018-11-11 17:19:44 PST
Comment on attachment 354486 [details]
Patch

I would expect it to edit the selected property (e.g. the one with the left "selection" border), not the first property.  Other than that, looks good.
Comment 5 Nikita Vasilyev 2018-11-11 20:08:11 PST
Created attachment 354529 [details]
Patch
Comment 6 Devin Rousso 2018-11-12 10:09:18 PST
Comment on attachment 354529 [details]
Patch

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

> Source/WebInspectorUI/UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js:515
> +            if (property && property.enabled) {

We could probably be a little "smart" here and try to find the first property after (or before if there are none after) that is `enabled`.
Comment 7 WebKit Commit Bot 2018-11-12 10:09:32 PST
Comment on attachment 354529 [details]
Patch

Clearing flags on attachment: 354529

Committed r238096: <https://trac.webkit.org/changeset/238096>
Comment 8 WebKit Commit Bot 2018-11-12 10:09:34 PST
All reviewed patches have been landed.  Closing bug.
Comment 9 Nikita Vasilyev 2018-11-13 13:46:05 PST
*** Bug 191135 has been marked as a duplicate of this bug. ***