RESOLVED FIXED Bug 190114
Web Inspector: Styles: start editing property name/value on mouseup instead of mousedown
https://bugs.webkit.org/show_bug.cgi?id=190114
Summary Web Inspector: Styles: start editing property name/value on mouseup instead o...
Nikita Vasilyev
Reported 2018-09-29 20:00:07 PDT
To enable multi-property selection, I suggest entering editing mode for property names and values on mouseup: Example: color: black; font-size: 14px; 1. mousedown on "color" 2. Move the mouse cursor to "font-size" 3. mouseup on "font-size" (or anywhere on the second line) Expected: Both properties are selected. --- This is NOT the matter of replacing "mousedown" to "mouseup" somewhere in the code. This is far more complex. SpreadsheetTextField, which is used by property names and values, enters editing mode on focus. Since name & value fields have tabIndex=0, mousedown on them triggers the focus event. Focusing on an element via the keyboard (e.g. by pressing Tab key) triggers the focus event as well - great, we have the same code path for keyboard and mouse navigation! It's VoiceOver-friendly, too! It was all great until now. Focus change always happens on mousedown, which means I can no longer rely on it for mouse navigation.
Attachments
Patch (4.04 KB, patch)
2018-10-02 11:53 PDT, Nikita Vasilyev
no flags
[Animated GIF] With patch applied (50.56 KB, image/gif)
2018-10-02 12:02 PDT, Nikita Vasilyev
no flags
Radar WebKit Bug Importer
Comment 1 2018-09-29 20:33:26 PDT
Nikita Vasilyev
Comment 2 2018-10-02 11:53:48 PDT
Nikita Vasilyev
Comment 3 2018-10-02 12:00:25 PDT
(In reply to Nikita Vasilyev from comment #0) > SpreadsheetTextField, which is used by property names and values, enters > editing mode on focus. Since name & value fields have tabIndex=0, > mousedown on them triggers the focus event. Focusing on an element via the > keyboard (e.g. by pressing Tab key) triggers the focus event as well - great, > we have the same code path for keyboard and mouse navigation! It's > VoiceOver-friendly, too! > > It was all great until now. Focus change always happens on mousedown, which > means I can no longer rely on it for mouse navigation. The current version of the style editor doesn't rely on tabIndex for keyboard navigation between property names and values - it's already a separate code path.
Nikita Vasilyev
Comment 4 2018-10-02 12:02:38 PDT
Created attachment 351427 [details] [Animated GIF] With patch applied
Matt Baker
Comment 5 2018-10-02 17:04:46 PDT
Comment on attachment 351425 [details] Patch r=me
WebKit Commit Bot
Comment 6 2018-10-02 17:29:49 PDT
Comment on attachment 351425 [details] Patch Clearing flags on attachment: 351425 Committed r236780: <https://trac.webkit.org/changeset/236780>
WebKit Commit Bot
Comment 7 2018-10-02 17:29:51 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.