Expanding object with lots of properties can scroll the output to the bottom
Categories
(DevTools :: Console, defect, P1)
Tracking
(firefox-esr68 unaffected, firefox76 unaffected, firefox77 unaffected, firefox78 verified, firefox79 verified)
| Tracking | Status | |
|---|---|---|
| firefox-esr68 | --- | unaffected |
| firefox76 | --- | unaffected |
| firefox77 | --- | unaffected |
| firefox78 | --- | verified |
| firefox79 | --- | verified |
People
(Reporter: nchevobbe, Assigned: nchevobbe)
References
(Regression)
Details
(Keywords: regression)
Attachments
(1 file)
|
47 bytes,
text/x-phabricator-request
|
jcristau
:
approval-mozilla-beta+
|
Details | Review |
Steps to reproduce
- With the console open at the bottom and the console being not too tall
- Evaluate
document - Expand the resulting object
Actual results
The console is scroll to the very bottom, making the top of the message out of view
This was regressed by Bug 1421659, where we scroll to the bottom when the output size changes.
| Assignee | ||
Comment 1•5 years ago
|
||
Note that this can only happen when the document is logged in a non-overflowed console.
When the console overflows, expanding an object doesn't impact its size, so the resizeObserver callback isn't triggered.
Comment 2•5 years ago
|
||
I agree that the inspected object should be kept in view. But scrolling down seems good, the previous behavior was annoying:
┌────────────────────────────┐
│ ... │
│ ... │
│ ... │
│ ... │
│ ▶ HTMLDocument │
└────────────────────────────┘
If I the expand the HTMLDocument, it's because I want to see its properties. But I still had to scroll down manually:
┌────────────────────────────┐
│ ... │
│ ... │
│ ... │
│ ... │
│ ▼ HTMLDocument │
└─┴──────────────────────────┘
Something like this could be better:
┌────────────────────────────┐
│ ▼ HTMLDocument │
│ │ URL: "about:blank" │
│ │ ▶ activeElement: <body> │
│ │ alinkColor: "" │
│ │ ▶ all: HTMLAllCollection │
└─┴──────────────────────────┘
Comment 3•5 years ago
|
||
Set release status flags based on info from the regressing bug 1421659
Updated•5 years ago
|
Comment 4•5 years ago
|
||
Any update on this Nicolas? Do you expect to have a fix for 78?
| Assignee | ||
Comment 5•5 years ago
|
||
It's on my list of things to do, but I'm still not sure what the fix can look like.
I'll try to get to it this week, and if I can't we can rollback Bug 1421659 (since the issue was already here for a long time)
| Assignee | ||
Comment 6•5 years ago
|
||
The issue was that we were having a ResizeObserver only on the console output
node. When the output only has a few node, its height is impacted when an
element is expanded.
We fix this by observing the output parent node, which contains both the input
and the output, which prevents the issue.
In editor mode though, we still need to observe only the output element, as
the editor is on the right side.
So when the console changes from editor mode to inline, or the other way around,
we change the observed element.
A test case is added to make sure the issue is fixed. Sadly, this also means
we have to remove a test case (typing a multiline expression in input mode
won't keep the output scroll to the bottom), but it's a tradeoff I'm willing
to make as the issue isn't as annoying as the one we're fixing here.
Comment 8•5 years ago
|
||
| bugherder | ||
| Assignee | ||
Comment 9•5 years ago
|
||
Comment on attachment 9157226 [details]
Bug 1641554 - Fix scroll to bottom issue when expanding object in console. r=bomsy.
Beta/Release Uplift Approval Request
- User impact if declined: DevTools Console would scroll to the bottom on user interaction when it's not supposed to (expanding an object)
- Is this code covered by automated tests?: Yes
- Has the fix been verified in Nightly?: No
- Needs manual test from QE?: Yes
- If yes, steps to reproduce: 1. Open the console
- Clear it
- Evaluate
Array.from({length: 100}, (_, i) => i).reduce((acc, item) => {acc["item-" + item] = item; return acc;}, {}) - Expand the object produced
-> the output shouldn't scroll to the bottom
- List of other uplifts needed: None
- Risk to taking this patch: Low
- Why is the change risky/not risky? (and alternatives if risky): DevTools only, covered by test
- String changes made/needed:
| Assignee | ||
Updated•5 years ago
|
Updated•5 years ago
|
Comment 10•5 years ago
|
||
Comment on attachment 9157226 [details]
Bug 1641554 - Fix scroll to bottom issue when expanding object in console. r=bomsy.
approved for 78 rc1
Comment 11•5 years ago
|
||
I have managed to reproduce the issue on an old Fx78.0a1 build.
The issue is verified fixed using the latest Fx79.0a1 on Windows 10, Ubuntu 18.04 and macOS 10.14. Expanding the result of the array no longer scrolls automatically to the bottom.
Comment 12•5 years ago
|
||
| bugherder uplift | ||
Comment 13•5 years ago
|
||
Verified as fixed using Fx78.0RC on windows 10, ubuntu 18.04 and macOS 10.14.
Updated•5 years ago
|
Updated•5 years ago
|
Description
•