[PR #22536] [CLOSED] feat: content-aware scroll-to-bottom button #49791

Closed
opened 2026-04-30 02:07:27 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/open-webui/open-webui/pull/22536
Author: @jannikstdl
Created: 3/10/2026
Status: Closed

Base: devHead: feat/scroll-button-content-aware


📝 Commits (1)

  • 02fff90 feat: content-aware scroll-to-bottom button

📊 Changes

1 file changed (+28 additions, -2 deletions)

View changed files

📝 src/lib/components/chat/MessageInput.svelte (+28 -2)

📄 Description

The scroll-to-bottom button currently uses the autoScroll flag to decide when to show up. That flag can toggle too early in some cases, making the button flash on when everything is still visible on screen.

This changes it to check the actual DOM position of the content end. If the last message is below the viewport, the button shows. If not, it stays hidden. Falls back to the old autoScroll behavior when the #messages-bottom marker isn't present.

Note: The full benefit of this PR only kicks in when #22535 is also merged, since that PR adds the #messages-bottom marker. Without it, this falls back to the existing autoScroll flag behavior, which works fine on its own but doesn't give the improved accuracy.

Contributor License Agreement


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/open-webui/open-webui/pull/22536 **Author:** [@jannikstdl](https://github.com/jannikstdl) **Created:** 3/10/2026 **Status:** ❌ Closed **Base:** `dev` ← **Head:** `feat/scroll-button-content-aware` --- ### 📝 Commits (1) - [`02fff90`](https://github.com/open-webui/open-webui/commit/02fff9055041bcc5a6d906f3b8b0f42791f66ebe) feat: content-aware scroll-to-bottom button ### 📊 Changes **1 file changed** (+28 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `src/lib/components/chat/MessageInput.svelte` (+28 -2) </details> ### 📄 Description The scroll-to-bottom button currently uses the `autoScroll` flag to decide when to show up. That flag can toggle too early in some cases, making the button flash on when everything is still visible on screen. This changes it to check the actual DOM position of the content end. If the last message is below the viewport, the button shows. If not, it stays hidden. Falls back to the old `autoScroll` behavior when the `#messages-bottom` marker isn't present. **Note:** The full benefit of this PR only kicks in when #22535 is also merged, since that PR adds the `#messages-bottom` marker. Without it, this falls back to the existing `autoScroll` flag behavior, which works fine on its own but doesn't give the improved accuracy. ### Contributor License Agreement - [x] By submitting this pull request, I confirm that I have read and fully agree to the [Contributor License Agreement (CLA)](https://github.com/open-webui/open-webui/blob/main/CONTRIBUTOR_LICENSE_AGREEMENT), and I am providing my contributions under its terms. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-30 02:07:28 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#49791