Web Inspector: REGRESSION: TreeElement or Table row selected using the keyboard shoul...
authormattbaker@apple.com <mattbaker@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 25 Feb 2019 22:22:56 +0000 (22:22 +0000)
committermattbaker@apple.com <mattbaker@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 25 Feb 2019 22:22:56 +0000 (22:22 +0000)
https://bugs.webkit.org/show_bug.cgi?id=194918
<rdar://problem/48289314>

Reviewed by Devin Rousso.

* UserInterface/Views/Table.js:
(WI.Table.prototype.selectionControllerSelectionDidChange):

* UserInterface/Views/TreeOutline.js:
(WI.TreeOutline.prototype._treeKeyDown):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@242057 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebInspectorUI/ChangeLog
Source/WebInspectorUI/UserInterface/Views/Table.js
Source/WebInspectorUI/UserInterface/Views/TreeOutline.js

index 07b05ba..3b14c08 100644 (file)
@@ -1,3 +1,17 @@
+2019-02-25  Matt Baker  <mattbaker@apple.com>
+
+        Web Inspector: REGRESSION: TreeElement or Table row selected using the keyboard should always be revealed
+        https://bugs.webkit.org/show_bug.cgi?id=194918
+        <rdar://problem/48289314>
+
+        Reviewed by Devin Rousso.
+
+        * UserInterface/Views/Table.js:
+        (WI.Table.prototype.selectionControllerSelectionDidChange):
+
+        * UserInterface/Views/TreeOutline.js:
+        (WI.TreeOutline.prototype._treeKeyDown):
+
 2019-02-25  Devin Rousso  <drousso@apple.com>
 
         Web Inspector: [META] Merge Resources and Debugger into a single Sources tab
index 0628f48..68df935 100644 (file)
@@ -619,10 +619,9 @@ WI.Table = class Table extends WI.View
                 row.classList.toggle("selected", true);
         }
 
-        if (selectedItems.size === 1) {
-            let rowIndex = this._indexForRepresentedObject(selectedItems.firstValue);
-            if (!this._isRowVisible(rowIndex))
-                this.revealRow(rowIndex);
+        if (this._selectionController.lastSelectedItem) {
+            let rowIndex = this._indexForRepresentedObject(this._selectionController.lastSelectedItem);
+            this.revealRow(rowIndex);
         }
 
         if (this._delegate.tableSelectionDidChange)
index 50b17fc..b3e4622 100644 (file)
@@ -661,6 +661,9 @@ WI.TreeOutline = class TreeOutline extends WI.Object
             this._itemWasSelectedByUser = true;
             handled = this._selectionController.handleKeyDown(event);
             this._itemWasSelectedByUser = false;
+
+            if (handled)
+                nextSelectedElement = this.selectedTreeElement;
         }
 
         if (nextSelectedElement) {