Title: [264667] trunk/Source/WebInspectorUI
Revision
264667
Author
drou...@apple.com
Date
2020-07-21 11:51:39 -0700 (Tue, 21 Jul 2020)

Log Message

Web Inspector: Elements: Styles: don't blur the add class input when a class is added
https://bugs.webkit.org/show_bug.cgi?id=214604

Reviewed by Brian Burg.

* UserInterface/Views/GeneralStyleDetailsSidebarPanel.js:
(WI.GeneralStyleDetailsSidebarPanel.prototype._addClassInputKeyPressed):
(WI.GeneralStyleDetailsSidebarPanel.prototype._addClassInputBlur):
(WI.GeneralStyleDetailsSidebarPanel.prototype._addClassFromInput): Added.

* UserInterface/Views/GeneralStyleDetailsSidebarPanel.css:
(.sidebar > .panel.details.css-style > .content ~ .class-list-container):
Drive-by: don't show a scrollbar unless needed.

Modified Paths

Diff

Modified: trunk/Source/WebInspectorUI/ChangeLog (264666 => 264667)


--- trunk/Source/WebInspectorUI/ChangeLog	2020-07-21 18:48:59 UTC (rev 264666)
+++ trunk/Source/WebInspectorUI/ChangeLog	2020-07-21 18:51:39 UTC (rev 264667)
@@ -1,5 +1,21 @@
 2020-07-21  Devin Rousso  <drou...@apple.com>
 
+        Web Inspector: Elements: Styles: don't blur the add class input when a class is added
+        https://bugs.webkit.org/show_bug.cgi?id=214604
+
+        Reviewed by Brian Burg.
+
+        * UserInterface/Views/GeneralStyleDetailsSidebarPanel.js:
+        (WI.GeneralStyleDetailsSidebarPanel.prototype._addClassInputKeyPressed):
+        (WI.GeneralStyleDetailsSidebarPanel.prototype._addClassInputBlur):
+        (WI.GeneralStyleDetailsSidebarPanel.prototype._addClassFromInput): Added.
+
+        * UserInterface/Views/GeneralStyleDetailsSidebarPanel.css:
+        (.sidebar > .panel.details.css-style > .content ~ .class-list-container):
+        Drive-by: don't show a scrollbar unless needed.
+
+2020-07-21  Devin Rousso  <drou...@apple.com>
+
         Web Inspector: REGRESSION(?): file names are not shown in the open resource dialog
         https://bugs.webkit.org/show_bug.cgi?id=214605
 

Modified: trunk/Source/WebInspectorUI/UserInterface/Views/GeneralStyleDetailsSidebarPanel.css (264666 => 264667)


--- trunk/Source/WebInspectorUI/UserInterface/Views/GeneralStyleDetailsSidebarPanel.css	2020-07-21 18:48:59 UTC (rev 264666)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/GeneralStyleDetailsSidebarPanel.css	2020-07-21 18:51:39 UTC (rev 264667)
@@ -148,7 +148,7 @@
     max-height: 75px;
     padding: 3px 2px;
     background-color: var(--panel-background-color);
-    overflow-y: scroll;
+    overflow-y: auto;
 }
 
 .sidebar > .panel.details.css-style > .content ~ .class-list-container[hidden] {

Modified: trunk/Source/WebInspectorUI/UserInterface/Views/GeneralStyleDetailsSidebarPanel.js (264666 => 264667)


--- trunk/Source/WebInspectorUI/UserInterface/Views/GeneralStyleDetailsSidebarPanel.js	2020-07-21 18:48:59 UTC (rev 264666)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/GeneralStyleDetailsSidebarPanel.js	2020-07-21 18:51:39 UTC (rev 264667)
@@ -332,13 +332,19 @@
         if (event.keyCode !== WI.KeyboardShortcut.Key.Enter.keyCode)
             return;
 
-        this._addClassInput.blur();
+        this._addClassFromInput();
     }
 
     _addClassInputBlur(event)
     {
+        this._addClassFromInput();
+
+        this._addClassContainer.classList.remove("active");
+    }
+
+    _addClassFromInput()
+    {
         this.domNode.toggleClass(this._addClassInput.value, true);
-        this._addClassContainer.classList.remove("active");
         this._addClassInput.value = null;
     }
 
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to