Changeset 291729 in webkit


Ignore:
Timestamp:
Mar 22, 2022 5:19:32 PM (4 months ago)
Author:
Patrick Angle
Message:

Web Inspector: Elements tab: selection variable not displayed after losing focus
https://bugs.webkit.org/show_bug.cgi?id=238226

Reviewed by Devin Rousso.

When rebuilding the underlying DOMTreeElements, we should make sure the inspected node is marked as such,
otherwise we won't update this until a different element becomes the inspected node.

  • UserInterface/Views/DOMTreeOutline.js:

(WI.DOMTreeOutline.prototype.update):

Location:
trunk/Source/WebInspectorUI
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebInspectorUI/ChangeLog

    r291712 r291729  
     12022-03-22  Patrick Angle  <pangle@apple.com>
     2
     3        Web Inspector: Elements tab: selection variable not displayed after losing focus
     4        https://bugs.webkit.org/show_bug.cgi?id=238226
     5
     6        Reviewed by Devin Rousso.
     7
     8        When rebuilding the underlying `DOMTreeElements`, we should make sure the inspected node is marked as such,
     9        otherwise we won't update this until a different element becomes the inspected node.
     10
     11        * UserInterface/Views/DOMTreeOutline.js:
     12        (WI.DOMTreeOutline.prototype.update):
     13
    1142022-03-22  Patrick Angle  <pangle@apple.com>
    215
  • trunk/Source/WebInspectorUI/UserInterface/Views/DOMTreeOutline.js

    r288030 r291729  
    190190        }
    191191
     192        if (WI.domManager.inspectedNode) {
     193            let inspectedNodeTreeElement = this.findTreeElement(WI.domManager.inspectedNode);
     194            if (inspectedNodeTreeElement) {
     195                inspectedNodeTreeElement.reveal();
     196                inspectedNodeTreeElement.listItemElement.classList.add("inspected-node");
     197            }
     198        }
     199
    192200        if (!selectedTreeElements.length)
    193201            return;
Note: See TracChangeset for help on using the changeset viewer.