Bug 180791 - Web Inspector: Styles Redesign: clicking CSS property or selector should always select its text
Summary: Web Inspector: Styles Redesign: clicking CSS property or selector should alwa...
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: 2017-12-13 18:29 PST by Nikita Vasilyev
Modified: 2019-02-22 20:08 PST (History)
5 users (show)

See Also:


Attachments
[Animated GIF] Bug (100.79 KB, image/gif)
2017-12-13 18:29 PST, Nikita Vasilyev
no flags Details
Patch (6.65 KB, patch)
2019-02-21 14:30 PST, 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 Nikita Vasilyev 2017-12-13 18:29:03 PST
Created attachment 329304 [details]
[Animated GIF] Bug

Clicking on CSS selector, property name or value sometimes selects the text and sometimes just places text caret where it was clicked. It should always select the text.
Comment 1 Radar WebKit Bug Importer 2017-12-13 18:29:15 PST
<rdar://problem/36038366>
Comment 2 Nikita Vasilyev 2018-01-06 16:06:33 PST
Currently, the editing starts on mousedown. This matches the behavior of a textarea element, contentEditable, etc.

In Chrome DevTools and Firefox DevTools, editing starts on mouseup. This makes copying several CSS properties easier: clicking on a CSS property doesn't immediately start editing. Clicking on a property name and dragging the cursor down can select text of several properties.

Perhaps starting editing on mouseup is the desirable behavior for most cases, and we should do this, too.
Comment 3 Devin Rousso 2019-02-21 14:30:01 PST
Created attachment 362649 [details]
Patch
Comment 4 Nikita Vasilyev 2019-02-21 15:31:41 PST
I've been working[1] towards using SpreadsheetTextField for CSS selectors and getting rid of SpreadsheetSelectorField entirely.

You're welcome to write a patch to use SpreadsheetTextField for CSS selectors. I'd be happy to review it.

1: Bug 194724 - Web Inspector: Move CSS completion logic from SpreadsheetTextField to SpreadsheetStyleProperty
Comment 5 Brian Burg 2019-02-22 14:49:19 PST
Comment on attachment 362649 [details]
Patch

r=me
Comment 6 WebKit Commit Bot 2019-02-22 20:08:04 PST
Comment on attachment 362649 [details]
Patch

Clearing flags on attachment: 362649

Committed r241980: <https://trac.webkit.org/changeset/241980>
Comment 7 WebKit Commit Bot 2019-02-22 20:08:05 PST
All reviewed patches have been landed.  Closing bug.