Skip to content

Only manage scroll in log tailer when scrolled to the bottom #12459

Open
@kj800x

Description

Before you start please confirm the following.

Problem Description

When viewing logs and not scrolled to the bottom of the log viewer, the scroll position keeps getting reset to the bottom.

Yes, I've searched similar issues on GitHub.

I have searched for similar issues and there are some reported but they are all reported as closed. I cannot find any open issues aside from #4338 which is a related but separate issue.

Expected Behavior

When viewing logs and not scrolled to the bottom of the log viewer, the scroll position should not be affected by the logs refreshing.

Actual Behavior

When viewing logs and not scrolled to the bottom of the log viewer, the scroll position resets to the bottom constantly, making it impossible to review old logs unless you uncheck "Auto-refresh logs". This is an unintuitive UX which was previously reported and fixed as part of #6797 and #7993.

Steps to Reproduce

  1. Go to the log viewer for any container with multiple screens worth of logs.
  2. Ensure that Auto-refresh logs is enabled (we do want to see new logs come in when we're scrolled to the bottom).
  3. Scroll up and try to select some text from a few screens ago.
  4. Watch as the log viewer jumps to the bottom automatically.

Portainer logs or screenshots

simplescreenrecorder-2024-12-30_18.28.28.mp4

Portainer version

2.25.1

Portainer Edition

Community Edition (CE)

Platform and Version

Docker version 27.1.2, build d01f264

OS and Architecture

Linux entei 6.2.16-20-bpo11-pve #1 SMP PREEMPT_DYNAMIC PVE 6.2.16-20~bpo11+1 (2023-12-01T14:42Z) x86_64 GNU/Linux

Browser

Google Chrome Version 131.0.6778.204 (Official Build) (64-bit)

What command did you use to deploy Portainer?

No response

Additional Information

This bug appears to have been previously reported as an enhancement and marked as completed in both #6797 and #7993 (reported fixed in 2.17), but in the latest version (2.21.5) the issue is still here implying that the behavior has regressed and there's now a bug.

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions