DevTools: Fix non-dismiss of request inspector on reset
When a user toggles off and then on the network monitoring, without the
Preserve Log option enabled, the network log resets. However, if the
individual request inspection pane is open, it will stay open. This is due
to a parameter in NetworkLogView#_reset being true instead of false.
However, correcting this behavior has a side effect that, when enabling
the logging option in the same manner as above but with the keyboard, it
shifts focus to the network data grid (which is empty). This causes an
a11y problem because NVDA just announces "blank". So this change removes
the call to NetworkLogView#resetFocus from the handler within
NetworkPanel#_hideRequestFocus().
However, that change ALSO causes a problem, in that pressing <Esc> uses
that code path. Instead, we'll call NetworkLogView#resetFocus from the
keyboard handler which is the NetworkPanel action delegate.
Bug: 1025332
Change-Id: Ida7b78447237914df5f51b31edc7ab8cf2aa7c56
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1918734
Reviewed-by: Mike Jackson <[email protected]>
Reviewed-by: Brandon Goddard <[email protected]>
Commit-Queue: Robert Paveza <[email protected]>
diff --git a/front_end/network/NetworkLogView.js b/front_end/network/NetworkLogView.js
index f228471..c0ee146 100644
--- a/front_end/network/NetworkLogView.js
+++ b/front_end/network/NetworkLogView.js
@@ -1115,7 +1115,7 @@
}
_reset() {
- this.dispatchEventToListeners(Network.NetworkLogView.Events.RequestActivated, /* showPanel */ true);
+ this.dispatchEventToListeners(Network.NetworkLogView.Events.RequestActivated, /* showPanel */ false);
this._setHoveredNode(null);
this._columns.reset();