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.
<rdar://problem/44891030>
Created attachment 351425 [details] Patch
(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.
Created attachment 351427 [details] [Animated GIF] With patch applied
Comment on attachment 351425 [details] Patch r=me
Comment on attachment 351425 [details] Patch Clearing flags on attachment: 351425 Committed r236780: <https://trac.webkit.org/changeset/236780>
All reviewed patches have been landed. Closing bug.