Bug 146490 - Web Inspector: Make the first click on a rule section create a newline for easy property addition
Summary: Web Inspector: Make the first click on a rule section create a newline for ea...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2015-06-30 21:02 PDT by Devin Rousso
Modified: 2015-07-01 17:48 PDT (History)
8 users (show)

See Also:


Attachments
Expected Functionality (from Chrome) (221.13 KB, video/quicktime)
2015-06-30 21:02 PDT, Devin Rousso
no flags Details
Patch (3.36 KB, patch)
2015-06-30 21:14 PDT, Devin Rousso
no flags Details | Formatted Diff | Diff
After Patch is applied (492.26 KB, video/quicktime)
2015-06-30 21:14 PDT, Devin Rousso
no flags Details
Patch (6.96 KB, patch)
2015-07-01 11:58 PDT, Devin Rousso
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Devin Rousso 2015-06-30 21:02:52 PDT
Created attachment 255890 [details]
Expected Functionality (from Chrome)

Clicking on the last line of a rule section should create a newline and place the cursor on the beginning of that newline to make adding new properties easier.  This should only happen, however, on the first click of that rule section, meaning that once it is focused (and until it has lost focus) clicking on the last line will simply put the cursor at the end of that line.
Comment 1 Radar WebKit Bug Importer 2015-06-30 21:03:31 PDT
<rdar://problem/21625881>
Comment 2 Devin Rousso 2015-06-30 21:14:02 PDT
Created attachment 255893 [details]
Patch
Comment 3 Devin Rousso 2015-06-30 21:14:30 PDT
Created attachment 255894 [details]
After Patch is applied
Comment 4 Timothy Hatcher 2015-06-30 22:13:08 PDT
Comment on attachment 255893 [details]
Patch

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

> Source/WebInspectorUI/ChangeLog:12
> +        (WebInspector.CSSStyleDeclarationTextEditor.prototype._editorFocused): When the editor gains focus and the cursor is on
> +        the last line of the rule, insert a new line and place the cursor on that line.

Chrome seems to do this on any line. Should we? I think last line is fine too.
Comment 5 Devin Rousso 2015-07-01 11:58:14 PDT
Created attachment 255942 [details]
Patch
Comment 6 Timothy Hatcher 2015-07-01 16:34:49 PDT
Comment on attachment 255942 [details]
Patch

Awesome!
Comment 7 WebKit Commit Bot 2015-07-01 17:48:51 PDT
Comment on attachment 255942 [details]
Patch

Clearing flags on attachment: 255942

Committed r186212: <http://trac.webkit.org/changeset/186212>
Comment 8 WebKit Commit Bot 2015-07-01 17:48:53 PDT
All reviewed patches have been landed.  Closing bug.