Changeset 228232 in webkit


Ignore:
Timestamp:
Feb 7, 2018 11:01:16 AM (6 years ago)
Author:
Nikita Vasilyev
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):

Location:
trunk/Source/WebInspectorUI
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebInspectorUI/ChangeLog

    r228216 r228232  
     12018-02-07  Nikita Vasilyev  <nvasilyev@apple.com>
     2
     3        Web Inspector: Styles: completion popover doesn't hide when switching panels
     4        https://bugs.webkit.org/show_bug.cgi?id=182464
     5        <rdar://problem/37202763>
     6
     7        Reviewed by Timothy Hatcher.
     8
     9        Hide completion popover by triggering blur event on the focused text field.
     10        Removing text fields from the DOM tree would hide the completion popovers as well,
     11        but switching sidebar panels doesn't remove them from the DOM.
     12
     13        * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js:
     14        (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.hidden):
     15        * UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js:
     16        (WI.SpreadsheetCSSStyleDeclarationSection.prototype.hidden):
     17        * UserInterface/Views/SpreadsheetRulesStyleDetailsPanel.js:
     18        (WI.SpreadsheetRulesStyleDetailsPanel.prototype.hidden):
     19        * UserInterface/Views/SpreadsheetStyleProperty.js:
     20        (WI.SpreadsheetStyleProperty.prototype.hidden):
     21
    1222018-02-06  Devin Rousso  <webkit@devinrousso.com>
    223
  • trunk/Source/WebInspectorUI/UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js

    r228216 r228232  
    106106    }
    107107
     108    hidden()
     109    {
     110        for (let propertyView of this._propertyViews)
     111            propertyView.hidden();
     112    }
     113
    108114    get style()
    109115    {
  • trunk/Source/WebInspectorUI/UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js

    r227370 r228232  
    120120    }
    121121
     122    hidden()
     123    {
     124        this._propertiesEditor.hidden();
     125    }
     126
    122127    startEditingRuleSelector()
    123128    {
  • trunk/Source/WebInspectorUI/UserInterface/Views/SpreadsheetRulesStyleDetailsPanel.js

    r227228 r228232  
    148148    }
    149149
     150    hidden()
     151    {
     152        for (let section of this._sections)
     153            section.hidden();
     154
     155        super.hidden();
     156    }
     157
    150158    scrollToSectionAndHighlightProperty(property)
    151159    {
  • trunk/Source/WebInspectorUI/UserInterface/Views/SpreadsheetStyleProperty.js

    r228214 r228232  
    7575    }
    7676
     77    hidden()
     78    {
     79        if (this._nameTextField && this._nameTextField.editing)
     80            this._nameTextField.element.blur();
     81        else if (this._valueTextField && this._valueTextField.editing)
     82            this._valueTextField.element.blur();
     83    }
     84
    7785    highlight()
    7886    {
Note: See TracChangeset for help on using the changeset viewer.