Changeset 237397 in webkit


Ignore:
Timestamp:
Oct 24, 2018 1:19:39 PM (6 years ago)
Author:
Devin Rousso
Message:

Web Inspector: REGRESSION (r237232): changing resources via up/down blurs the TreeOutline in Resources
https://bugs.webkit.org/show_bug.cgi?id=190862

Reviewed by Matt Baker.

  • UserInterface/Views/TextEditor.js:

(WI.TextEditor.prototype.set selectedTextRange):
Don't focus unless the activeElement is not a WebInspector element (e.g. <body>),
meaning that the previously focused element has been removed from the DOM and no longer
needs to keep the focus.

Location:
trunk/Source/WebInspectorUI
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebInspectorUI/ChangeLog

    r237396 r237397  
     12018-10-24  Devin Rousso  <drousso@apple.com>
     2
     3        Web Inspector: REGRESSION (r237232): changing resources via up/down blurs the TreeOutline in Resources
     4        https://bugs.webkit.org/show_bug.cgi?id=190862
     5
     6        Reviewed by Matt Baker.
     7
     8        * UserInterface/Views/TextEditor.js:
     9        (WI.TextEditor.prototype.set selectedTextRange):
     10        Don't `focus` unless the `activeElement` is not a WebInspector element (e.g. <body>),
     11        meaning that the previously focused element has been removed from the DOM and no longer
     12        needs to keep the focus.
     13
    1142018-10-24  Devin Rousso  <drousso@apple.com>
    215
  • trunk/Source/WebInspectorUI/UserInterface/Views/TextEditor.js

    r237396 r237397  
    235235    set selectedTextRange(textRange)
    236236    {
     237        if (document.activeElement === document.body)
     238            this.focus();
     239
    237240        var position = this._codeMirrorPositionFromTextRange(textRange);
    238         this.focus();
    239241        this._codeMirror.setSelection(position.start, position.end);
    240242    }
Note: See TracChangeset for help on using the changeset viewer.