Closed Bug 1534938 Opened 6 months ago Closed 6 months ago

Expanding a console.group message shouldn't scroll to bottom

Categories

(DevTools :: Console, defect, P1)

66 Branch
defect

Tracking

(firefox68 fixed)

RESOLVED FIXED
Firefox 68
Tracking Status
firefox68 --- fixed

People

(Reporter: nchevobbe, Assigned: nchevobbe)

Details

(Whiteboard: [console-grouping])

Attachments

(1 file)

Steps to reproduce

  1. Go to https://nchevobbe.github.io/demo/console-test-app.html
  2. Open the console
  3. Log multiple messages until the console output overflows
  4. Click on the groupCollapsed button
  5. Add multiple logs
  6. Click on the groupEnd button
  7. Add one info log
  8. Expand the groupCollapsed message in the console

Expected results

The scroll position does not change, so the group header message is still at the same position

Actual results

The output is scrolled to the bottom after opening the group.

Whiteboard: [console-group]
Assignee: nobody → nchevobbe
Status: NEW → ASSIGNED
Priority: P2 → P1
Whiteboard: [console-group] → [console-grouping]

The heuristic to scroll the console output to the bottom was
to only look if new messages were visible. But it can happen
that such case is triggered by only opening a closed group.
This patch tweaks the heuristic a bit to exclude the case
where we open a group, while making sure that we still
scroll to bottom if there are new, opened, group messages.
A test is added to ensure this works as expected.

Pushed by nchevobbe@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/89c31db7b51e
Don't scroll to bottom when opening a group. r=Honza.
Status: ASSIGNED → RESOLVED
Closed: 6 months ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 68
You need to log in before you can comment on or make changes to this bug.