Summary: | Web Inspector: Styles: selection lost when inspector is blurred | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Devin Rousso <hi> | ||||||
Component: | Web Inspector | Assignee: | Nikita Vasilyev <nvasilyev> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Normal | CC: | commit-queue, hi, inspector-bugzilla-changes, nvasilyev, webkit-bug-importer | ||||||
Priority: | P2 | Keywords: | InRadar | ||||||
Version: | WebKit Nightly Build | ||||||||
Hardware: | All | ||||||||
OS: | All | ||||||||
Attachments: |
|
Description
Devin Rousso
2018-11-28 16:16:12 PST
Created attachment 358233 [details]
Patch
Created attachment 358235 [details]
[Video] With patch applied
Comment on attachment 358233 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=358233&action=review r=me > Source/WebInspectorUI/UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.css:137 > + background-color: var(--selected-background-color-unfocused); Aside: is there a reason we didn't make it so that `--background-color-selected` changes it's value when `.window-docked-inactive` or `.window-inactive` is set? We use this in a few places, usually when we want to limit `:focus` to a particular element (not the <body>), but I'd imagine that it would apply just as well when set from these classes too. Comment on attachment 358233 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=358233&action=review >> Source/WebInspectorUI/UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.css:137 >> + background-color: var(--selected-background-color-unfocused); > > Aside: is there a reason we didn't make it so that `--background-color-selected` changes it's value when `.window-docked-inactive` or `.window-inactive` is set? We use this in a few places, usually when we want to limit `:focus` to a particular element (not the <body>), but I'd imagine that it would apply just as well when set from these classes too. I find this easier to follow than: body:matches(.window-docked-inactive, .window-inactive) .spreadsheet-style-declaration-editor { --background-color-selected: var(--selected-background-color-unfocused); } The latter adds an extra level of abstraction which I don't find necessary. Comment on attachment 358233 [details] Patch Clearing flags on attachment: 358233 Committed r239588: <https://trac.webkit.org/changeset/239588> All reviewed patches have been landed. Closing bug. Comment on attachment 358233 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=358233&action=review >>> Source/WebInspectorUI/UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.css:137 >>> + background-color: var(--selected-background-color-unfocused); >> >> Aside: is there a reason we didn't make it so that `--background-color-selected` changes it's value when `.window-docked-inactive` or `.window-inactive` is set? We use this in a few places, usually when we want to limit `:focus` to a particular element (not the <body>), but I'd imagine that it would apply just as well when set from these classes too. > > I find this easier to follow than: > > body:matches(.window-docked-inactive, .window-inactive) .spreadsheet-style-declaration-editor { > --background-color-selected: var(--selected-background-color-unfocused); > } > > The latter adds an extra level of abstraction which I don't find necessary. I'd actually meant doing something like this in Variables.css, considering we already have `body.window-inactive` and `body.window-inactive *` rules. |