Closed
Bug 1576078
Opened 5 years ago
Closed 5 years ago
Selected frame scrolls out of the visible area
Categories
(DevTools :: Netmonitor, defect, P2)
DevTools
Netmonitor
Tracking
(Not tracked)
RESOLVED
DUPLICATE
of bug 1561873
People
(Reporter: Honza, Unassigned)
References
Details
STR:
- Load http://janodvarko.cz/test/websockets/
- Open the Network panel
- Click Connect and send ~10 frames
- Select the 101 request and the Messages panel. The frame list is properly scrolled to bottom
- Click at ~5th request from the top
- The preview panel opens (taking some of the vertical space) and the selected request is moved out from the visible area => BUG
Can we call something like ensureVisible
on the selected request to make sure that the user can still see it while inspecting the payload?
Honza
Reporter | ||
Updated•5 years ago
|
Blocks: network-websocket-inspector-m1
Reporter | ||
Updated•5 years ago
|
Priority: -- → P2
Reporter | ||
Comment 1•5 years ago
|
||
Heng Yeow, can you please look at this, thanks!
Honza
Flags: needinfo?(E0032242)
Reporter | ||
Comment 2•5 years ago
|
||
This seems to fix the issue for me:
diff --git a/devtools/client/netmonitor/src/components/websockets/FrameListContent.js b/devtools/client/netmonitor/src/--- a/devtools/client/netmonitor/src/components/websockets/FrameListContent.js
+++ b/devtools/client/netmonitor/src/components/websockets/FrameListContent.js
@@ -93,17 +93,22 @@ class FrameListContent extends Component
this.initIntersectionObserver = false;
}
// If a new WebSocket connection is selected, scroll to anchor.
if (channelId !== prevProps.channelId && scrollAnchor) {
scrollAnchor.scrollIntoView();
}
- this.setupScrollToBottom(startPanelContainer, scrollAnchor);
+ // Do not autoscroll if the selection changed. This would cause
+ // the newly selected frame to jump just after clicking in.
+ // (not user friendly)
+ if (prevProps.selectedFrame == this.props.selectedFrame) {
+ this.setupScrollToBottom(startPanelContainer, scrollAnchor);
+ }
}
componentWillUnmount() {
// Reset observables and boolean values.
const scrollAnchor = this.refs.scrollAnchor;
if (this.intersectionObserver) {
this.intersectionObserver.unobserve(scrollAnchor);
@tanhengyeow: can you please test this and upload to Phab.
Honza
Reporter | ||
Updated•5 years ago
|
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•