Closed Bug 1519435 Opened 5 years ago Closed 4 years ago

Experiment with scroll anchoring to handle pin-to-bottom behavior

Categories

(DevTools :: Console, enhancement, P2)

enhancement

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: nchevobbe, Unassigned)

Details

Attachments

(1 obsolete file)

No description provided.

Ryan, here's a patch where I try to implement pin-to-bottom using overflow-anchor: https://phabricator.services.mozilla.com/D16467
As said on IRC, this acts weirdly: when the console output overflowed once, we force a scroll to the bottom, which should "activate" the pin-to-bottom, as the red <hr> element is the only one having overflow-anchor: auto in the container.
But when adding a new message, the container scrolls all the way up. This does not happen if the <hr> is not visible (for example if you're scrolled mid-point).


Steps to reproduce

  1. Open https://nchevobbe.github.io/demo/console-test-app.html
  2. Open the console
  3. Hit the console.log button until the console output overflows
  4. Hit console.log once more

Expected results

The output stays scrolled to the bottom, following the red <hr> as the anchor

Actual results

The output is scrolled all the way up.
Now if you scroll down a bit, then hit the console.log button again, you can see that the scrolling position does not change. This seems to indicate an issue with the anchor.

Flags: needinfo?(rhunt)
Priority: -- → P2

So it looks like what I was seeing in Comment 2 is now gone, and the scroll anchoring works as intended, this is great!

DAMP does not show any changes performance wise.

There are some things that might be weird though. With this implementation, when expanding an object, if the anchor is "visible" (it's set to a transparent 1px tall element), we will stay pinned to the bottom. Which is kind of nice (I think we have a bug for that), but could be weird if the object is very tall for example.
Same thing when expanding groups, exceptions, …

So we might want to reference those cases and decide what we want to do.

Flags: needinfo?(rhunt)
Attachment #9036336 - Attachment is obsolete: true

too many edge-cases to take care of

Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: