Title: [258536] trunk/Source/WebInspectorUI
- Revision
- 258536
- Author
- [email protected]
- Date
- 2020-03-16 18:01:16 -0700 (Mon, 16 Mar 2020)
Log Message
REGRESSION(r257380): Web Inspector: deleting node causes TreeOutline to lose focus
https://bugs.webkit.org/show_bug.cgi?id=208364
<rdar://problem/59871772>
Reviewed by Devin Rousso.
Maintain keyboard focus within TreeOutline when selection changes.
* UserInterface/Views/TreeElement.js:
(WI.TreeElement.prototype.select):
Modified Paths
Diff
Modified: trunk/Source/WebInspectorUI/ChangeLog (258535 => 258536)
--- trunk/Source/WebInspectorUI/ChangeLog 2020-03-17 00:32:42 UTC (rev 258535)
+++ trunk/Source/WebInspectorUI/ChangeLog 2020-03-17 01:01:16 UTC (rev 258536)
@@ -1,3 +1,16 @@
+2020-03-16 Nikita Vasilyev <[email protected]>
+
+ REGRESSION(r257380): Web Inspector: deleting node causes TreeOutline to lose focus
+ https://bugs.webkit.org/show_bug.cgi?id=208364
+ <rdar://problem/59871772>
+
+ Reviewed by Devin Rousso.
+
+ Maintain keyboard focus within TreeOutline when selection changes.
+
+ * UserInterface/Views/TreeElement.js:
+ (WI.TreeElement.prototype.select):
+
2020-03-15 Yusuke Suzuki <[email protected]>
Should not use variable-length-array (VLA)
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/TreeElement.js (258535 => 258536)
--- trunk/Source/WebInspectorUI/UserInterface/Views/TreeElement.js 2020-03-17 00:32:42 UTC (rev 258535)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/TreeElement.js 2020-03-17 01:01:16 UTC (rev 258536)
@@ -520,17 +520,22 @@
select(omitFocus, selectedByUser, suppressNotification)
{
- if (!this.treeOutline || !this.selectable)
+ let treeOutline = this.treeOutline;
+ if (!treeOutline || !this.selectable)
return;
if (!omitFocus)
this.focus();
+ else if (treeOutline.element.contains(document.activeElement)) {
+ // When treeOutline has focus, focus on the newly selected treeElement.
+ this.focus();
+ }
if (this.selected && !this.treeOutline.allowsRepeatSelection)
return;
// Focusing on another node may detach "this" from tree.
- let treeOutline = this.treeOutline;
+ treeOutline = this.treeOutline;
if (!treeOutline)
return;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes