Title: [237397] trunk/Source/WebInspectorUI
Revision
237397
Author
[email protected]
Date
2018-10-24 13:19:39 -0700 (Wed, 24 Oct 2018)

Log 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.

Modified Paths

Diff

Modified: trunk/Source/WebInspectorUI/ChangeLog (237396 => 237397)


--- trunk/Source/WebInspectorUI/ChangeLog	2018-10-24 19:27:27 UTC (rev 237396)
+++ trunk/Source/WebInspectorUI/ChangeLog	2018-10-24 20:19:39 UTC (rev 237397)
@@ -1,5 +1,18 @@
 2018-10-24  Devin Rousso  <[email protected]>
 
+        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.
+
+2018-10-24  Devin Rousso  <[email protected]>
+
         Web Inspector: CSP request payload on medium.com is unreadable, should be pretty-printed
         https://bugs.webkit.org/show_bug.cgi?id=190354
         <rdar://problem/45090894>

Modified: trunk/Source/WebInspectorUI/UserInterface/Views/TextEditor.js (237396 => 237397)


--- trunk/Source/WebInspectorUI/UserInterface/Views/TextEditor.js	2018-10-24 19:27:27 UTC (rev 237396)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/TextEditor.js	2018-10-24 20:19:39 UTC (rev 237397)
@@ -234,8 +234,10 @@
 
     set selectedTextRange(textRange)
     {
+        if (document.activeElement === document.body)
+            this.focus();
+
         var position = this._codeMirrorPositionFromTextRange(textRange);
-        this.focus();
         this._codeMirror.setSelection(position.start, position.end);
     }
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to