headlamp-k8s / headlamp

A Kubernetes web UI that is fully-featured, user-friendly and extensible
https://headlamp.dev
Apache License 2.0
2.22k stars 156 forks source link

[RFE] Only scroll log viewer down automatically if the view is at the bottom of it #546

Closed fondoger closed 2 years ago

fondoger commented 2 years ago

https://github.com/kinvolk/headlamp/blob/620e79d80c4330a0914ebbb6238b23e27b192efd/frontend/src/components/common/LogViewer.tsx#L62

  React.useEffect(() => {
    // @todo: Only scroll down automatically if the view hasn't been scrolled up by the user yet.
    if (logsBottomRef && logsBottomRef.current) {
      logsBottomRef.current.scrollIntoView();
    }
  }, [logs]);

Update (by Joaquim): This is about:

joaquimrocha commented 2 years ago

@fondoger , Not really, but if it's important we can raise its priority.

ashu8912 commented 2 years ago

This is fixed in main