Closed Bug 1776262 Opened 2 years ago Closed 2 years ago

Console keeps scrolling down

Categories

(DevTools :: Console, defect, P1)

Firefox 101
defect

Tracking

(firefox-esr91 unaffected, firefox-esr102102+ verified, firefox101 wontfix, firefox102 verified, firefox103 verified)

VERIFIED FIXED
103 Branch
Tracking Status
firefox-esr91 --- unaffected
firefox-esr102 102+ verified
firefox101 --- wontfix
firefox102 --- verified
firefox103 --- verified

People

(Reporter: drmccoy, Assigned: nchevobbe)

References

(Regression)

Details

(Keywords: regression)

Attachments

(1 file, 1 obsolete file)

My problem is the opposite of https://bugzilla.mozilla.org/show_bug.cgi?id=1760910 . Basically, I scroll up in the JavaScript console to inspect data, but the console keeps forcibly scrolling to the bottom.

I think I've found why it does that. I see this happening when having the console pulled up in the virtual tabletop "Foundry VTT", which does a periodic (every second XHR to /api/status). Every time the XHR happens, the console is forced to the bottom.

However, this only happens when the XHR are filtered away using the selector thingy at the top-right of the dev tools. Basically, it seems that when the XHR are not filtered away, the console correctly checks that, yes, the user manually scrolled to up, so we don't want to force them down; but when the XHR are filtered away, that check doesn't happen, so the console is forced to the bottom even though the new message isn't even shown.

Unfortunately, I don't think I can offer an easy way for someone else to reproduce this issue, save using Foundry VTT itself.

Assignee: nobody → nchevobbe
Severity: -- → S3
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Priority: -- → P1
Attached file console_pinned_bottom_xhr.html (obsolete) —

Hello drmccoy, thanks a lot for the report
I think I was able to narrow down the issue

Steps to reproduce

  1. Go to https://ffx-devtools-console-stuck-bottom-evaluation-xhr.glitch.me/
  2. Open the console
  3. Evaluate 1 + 1
  4. Try to scroll up

Expected results

You can scroll up fine

Actual results

The console keep scrolling back to the bottom


This only seems to happen when the last displayed message in the list is an evaluation result, so if a new log comes in, it will "unstuck" the scroll.

Can you confirm drmccoy ?

Attachment #9282743 - Attachment is obsolete: true

Yes, exactly, I can confirm.

(In your example, I also had to filter out Errors because of CORS stuff, though, but that changes nothing of the result. Also, now my IP seems to be(temporarily?) blocked with 429 Too Many Requests, so I'm answering via mobile LTE now)

(In reply to drmccoy from comment #2)

Yes, exactly, I can confirm.

Great!

(In your example, I also had to filter out Errors because of CORS stuff, though, but that changes nothing of the result. Also, now my IP seems to be(temporarily?) blocked with 429 Too Many Requests, so I'm answering via mobile LTE now)

Yeah sorry about that, I put the test page on Glitch instead, there shouldn't be error anymore

Okay so that's because of this change I made https://hg.mozilla.org/mozilla-central/rev/6955b2d62aa9a2bd9f803439f28cd1e984ddf850
we shouldn't check this through visible messages, as the "last displayed message" can be true for various reasons, and not only that we just displayed the result

Regressed by: 1753942

Set release status flags based on info from the regressing bug 1753942

When the last visible message was an evaluation result
but the last message in the store was something else,
the console would trigger the pin-to-bottom behavior.
This is fixed by checking if the last message in the
store (and not the last visible message) is a result.
A test case is added to make sure we don't regress.

Pushed by nchevobbe@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/efab979fdd37
[devtools] Fix stuck to bottom console output. r=jdescottes.
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 103 Branch

Comment on attachment 9282755 [details]
Bug 1776262 - [devtools] Fix stuck to bottom console output. r=jdescottes.

ESR Uplift Approval Request

  • If this is not a sec:{high,crit} bug, please state case for ESR consideration: This is an extremely annoying bug, making the webconsole, one of the most used panel in DevTools, misbehave. It would be unbearable for developers using ESR to suffer from this until next ESR is released
  • User impact if declined: When using the console, user can't scroll up on some relatively easy to hit condition
  • Fix Landed on Version: 103
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): Small DevTools only change + automated test
Attachment #9282755 - Flags: approval-mozilla-esr102?

Comment on attachment 9282755 [details]
Bug 1776262 - [devtools] Fix stuck to bottom console output. r=jdescottes.

Approved for 102.1esr.

Attachment #9282755 - Flags: approval-mozilla-esr102? → approval-mozilla-esr102+

Comment on attachment 9282755 [details]
Bug 1776262 - [devtools] Fix stuck to bottom console output. r=jdescottes.

Beta/Release Uplift Approval Request

  • User impact if declined: When using the console, user can't scroll up on some relatively easy to hit condition
  • 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. Go to https://ffx-devtools-console-stuck-bottom-evaluation-xhr.glitch.me/
  1. Open the console
  2. Evaluate 1 + 1
  3. Try to scroll up
  • List of other uplifts needed: None
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): Small DevTools only change + automated test
  • String changes made/needed:
  • Is Android affected?: No
Attachment #9282755 - Flags: approval-mozilla-release?
Flags: qe-verify+

Comment on attachment 9282755 [details]
Bug 1776262 - [devtools] Fix stuck to bottom console output. r=jdescottes.

Approved for 102.0.1, thanks.

Attachment #9282755 - Flags: approval-mozilla-release? → approval-mozilla-release+
QA Whiteboard: [qa-triaged]

I was able to reproduce the issue on Win10 using build 103.0a1(20220623190323) and steps from comment #1.
Verified as fixed on Win10/Ubuntu20.4/Mac 10.13 using Beta 103.0b4(20220703190044).

Status: RESOLVED → VERIFIED

Verified as fixed on Win10/Mac10.13/Ubuntu20.4 using 102.0.1(20220705093820).

On build 102.1.0esr (20220630085807) from https://treeherder.mozilla.org/jobs?repo=mozilla-esr102 issue is fixed on Win10/Ubuntu20.4.

Verified as fixed on Win10/Mac10.13/Ubuntu20.4 using build 102.0.1esr(20220711174428).

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: