Skip to content
Permalink
Browse files
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):


Canonical link: https://commits.webkit.org/198372@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@228232 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
NV committed Feb 7, 2018
1 parent c5b9a7e commit 26884abf62e0678aad5b10225268f767f405e602
@@ -1,3 +1,24 @@
2018-02-07 Nikita Vasilyev <nvasilyev@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 <webkit@devinrousso.com>

Web Inspector: Replace isAncestor and isDescendant with native DOM contains method
@@ -105,6 +105,12 @@ WI.SpreadsheetCSSStyleDeclarationEditor = class SpreadsheetCSSStyleDeclarationEd
propertyView.detached();
}

hidden()
{
for (let propertyView of this._propertyViews)
propertyView.hidden();
}

get style()
{
return this._style;
@@ -119,6 +119,11 @@ WI.SpreadsheetCSSStyleDeclarationSection = class SpreadsheetCSSStyleDeclarationS
this.startEditingRuleSelector();
}

hidden()
{
this._propertiesEditor.hidden();
}

startEditingRuleSelector()
{
if (!this._selectorElement) {
@@ -147,6 +147,14 @@ WI.SpreadsheetRulesStyleDetailsPanel = class SpreadsheetRulesStyleDetailsPanel e
super.refresh(significantChange);
}

hidden()
{
for (let section of this._sections)
section.hidden();

super.hidden();
}

scrollToSectionAndHighlightProperty(property)
{
if (!this._visible) {
@@ -74,6 +74,14 @@ WI.SpreadsheetStyleProperty = class SpreadsheetStyleProperty extends WI.Object
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");

0 comments on commit 26884ab

Please sign in to comment.