Title: [239588] trunk/Source/WebInspectorUI
Revision
239588
Author
nvasil...@apple.com
Date
2019-01-02 23:18:32 -0800 (Wed, 02 Jan 2019)

Log Message

Web Inspector: Styles: selection lost when inspector is blurred
https://bugs.webkit.org/show_bug.cgi?id=192124
<rdar://problem/46800965>

Reviewed by Devin Rousso.

* UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.css:
(body:matches(.window-docked-inactive, .window-inactive) .spreadsheet-style-declaration-editor .property.selected):
Selection should be gray when Web Inspector window isn't focused.

* UserInterface/Views/SpreadsheetStyleProperty.js:

Modified Paths

Diff

Modified: trunk/Source/WebInspectorUI/ChangeLog (239587 => 239588)


--- trunk/Source/WebInspectorUI/ChangeLog	2019-01-03 06:42:52 UTC (rev 239587)
+++ trunk/Source/WebInspectorUI/ChangeLog	2019-01-03 07:18:32 UTC (rev 239588)
@@ -1,5 +1,19 @@
 2019-01-02  Nikita Vasilyev  <nvasil...@apple.com>
 
+        Web Inspector: Styles: selection lost when inspector is blurred
+        https://bugs.webkit.org/show_bug.cgi?id=192124
+        <rdar://problem/46800965>
+
+        Reviewed by Devin Rousso.
+
+        * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.css:
+        (body:matches(.window-docked-inactive, .window-inactive) .spreadsheet-style-declaration-editor .property.selected):
+        Selection should be gray when Web Inspector window isn't focused.
+
+        * UserInterface/Views/SpreadsheetStyleProperty.js:
+
+2019-01-02  Nikita Vasilyev  <nvasil...@apple.com>
+
         Web Inspector: Styles: it shouldn't be possible to delete read-only properties
         https://bugs.webkit.org/show_bug.cgi?id=193099
         <rdar://problem/47016335>

Modified: trunk/Source/WebInspectorUI/UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.css (239587 => 239588)


--- trunk/Source/WebInspectorUI/UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.css	2019-01-03 06:42:52 UTC (rev 239587)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.css	2019-01-03 07:18:32 UTC (rev 239588)
@@ -133,6 +133,10 @@
     background-color: var(--background-color-selected);
 }
 
+body:matches(.window-docked-inactive, .window-inactive) .spreadsheet-style-declaration-editor .property.selected {
+    background-color: var(--selected-background-color-unfocused);
+}
+
 .spreadsheet-style-declaration-editor .property.selected:focus {
     border-left-color: var(--border-color-selected);
 }

Modified: trunk/Source/WebInspectorUI/UserInterface/Views/SpreadsheetStyleProperty.js (239587 => 239588)


--- trunk/Source/WebInspectorUI/UserInterface/Views/SpreadsheetStyleProperty.js	2019-01-03 06:42:52 UTC (rev 239587)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/SpreadsheetStyleProperty.js	2019-01-03 07:18:32 UTC (rev 239588)
@@ -54,6 +54,10 @@
             this._element.tabIndex = -1;
 
             this._element.addEventListener("blur", (event) => {
+                // Keep selection after tabbing out of Web Inspector window and back.
+                if (document.activeElement === this._element)
+                    return;
+
                 if (this._delegate.spreadsheetStylePropertyBlur)
                     this._delegate.spreadsheetStylePropertyBlur(event, this);
             });
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to