Title: [228232] trunk/Source/WebInspectorUI
- Revision
- 228232
- Author
- nvasil...@apple.com
- Date
- 2018-02-07 11:01:16 -0800 (Wed, 07 Feb 2018)
Log Message
Web Inspector: Styles: completion popover doesn't hide when switching panels
https://bugs.webkit.org/show_bug.cgi?id=182464
<rdar://problem/37202763>
Reviewed by Timothy Hatcher.
Hide completion popover by triggering blur event on the focused text field.
Removing text fields from the DOM tree would hide the completion popovers as well,
but switching sidebar panels doesn't remove them from the DOM.
* UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js:
(WI.SpreadsheetCSSStyleDeclarationEditor.prototype.hidden):
* UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js:
(WI.SpreadsheetCSSStyleDeclarationSection.prototype.hidden):
* UserInterface/Views/SpreadsheetRulesStyleDetailsPanel.js:
(WI.SpreadsheetRulesStyleDetailsPanel.prototype.hidden):
* UserInterface/Views/SpreadsheetStyleProperty.js:
(WI.SpreadsheetStyleProperty.prototype.hidden):
Modified Paths
Diff
Modified: trunk/Source/WebInspectorUI/ChangeLog (228231 => 228232)
--- trunk/Source/WebInspectorUI/ChangeLog 2018-02-07 18:56:02 UTC (rev 228231)
+++ trunk/Source/WebInspectorUI/ChangeLog 2018-02-07 19:01:16 UTC (rev 228232)
@@ -1,3 +1,24 @@
+2018-02-07 Nikita Vasilyev <nvasil...@apple.com>
+
+ Web Inspector: Styles: completion popover doesn't hide when switching panels
+ https://bugs.webkit.org/show_bug.cgi?id=182464
+ <rdar://problem/37202763>
+
+ Reviewed by Timothy Hatcher.
+
+ Hide completion popover by triggering blur event on the focused text field.
+ Removing text fields from the DOM tree would hide the completion popovers as well,
+ but switching sidebar panels doesn't remove them from the DOM.
+
+ * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js:
+ (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.hidden):
+ * UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js:
+ (WI.SpreadsheetCSSStyleDeclarationSection.prototype.hidden):
+ * UserInterface/Views/SpreadsheetRulesStyleDetailsPanel.js:
+ (WI.SpreadsheetRulesStyleDetailsPanel.prototype.hidden):
+ * UserInterface/Views/SpreadsheetStyleProperty.js:
+ (WI.SpreadsheetStyleProperty.prototype.hidden):
+
2018-02-06 Devin Rousso <web...@devinrousso.com>
Web Inspector: Replace isAncestor and isDescendant with native DOM contains method
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js (228231 => 228232)
--- trunk/Source/WebInspectorUI/UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js 2018-02-07 18:56:02 UTC (rev 228231)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js 2018-02-07 19:01:16 UTC (rev 228232)
@@ -105,6 +105,12 @@
propertyView.detached();
}
+ hidden()
+ {
+ for (let propertyView of this._propertyViews)
+ propertyView.hidden();
+ }
+
get style()
{
return this._style;
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js (228231 => 228232)
--- trunk/Source/WebInspectorUI/UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js 2018-02-07 18:56:02 UTC (rev 228231)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js 2018-02-07 19:01:16 UTC (rev 228232)
@@ -119,6 +119,11 @@
this.startEditingRuleSelector();
}
+ hidden()
+ {
+ this._propertiesEditor.hidden();
+ }
+
startEditingRuleSelector()
{
if (!this._selectorElement) {
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/SpreadsheetRulesStyleDetailsPanel.js (228231 => 228232)
--- trunk/Source/WebInspectorUI/UserInterface/Views/SpreadsheetRulesStyleDetailsPanel.js 2018-02-07 18:56:02 UTC (rev 228231)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/SpreadsheetRulesStyleDetailsPanel.js 2018-02-07 19:01:16 UTC (rev 228232)
@@ -147,6 +147,14 @@
super.refresh(significantChange);
}
+ hidden()
+ {
+ for (let section of this._sections)
+ section.hidden();
+
+ super.hidden();
+ }
+
scrollToSectionAndHighlightProperty(property)
{
if (!this._visible) {
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/SpreadsheetStyleProperty.js (228231 => 228232)
--- trunk/Source/WebInspectorUI/UserInterface/Views/SpreadsheetStyleProperty.js 2018-02-07 18:56:02 UTC (rev 228231)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/SpreadsheetStyleProperty.js 2018-02-07 19:01:16 UTC (rev 228232)
@@ -74,6 +74,14 @@
this._valueTextField.detached();
}
+ hidden()
+ {
+ if (this._nameTextField && this._nameTextField.editing)
+ this._nameTextField.element.blur();
+ else if (this._valueTextField && this._valueTextField.editing)
+ this._valueTextField.element.blur();
+ }
+
highlight()
{
this._element.classList.add("highlighted");
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes