Skip to content

Commit f51d2b0

Browse files
authored
Merge pull request open-webui#24483 from open-webui/dev
0.9.4
2 parents adc9076 + 0f07af1 commit f51d2b0

5 files changed

Lines changed: 42 additions & 4 deletions

File tree

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [0.9.4] - 2026-05-09
9+
10+
### Fixed
11+
12+
- 📜 **Chat scroll position on load.** Opening a chat conversation now reliably scrolls to the bottom of the message history, fixing a regression caused by `content-visibility: auto` where estimated element sizes prevented the initial scroll from reaching the true bottom.
13+
814
## [0.9.3] - 2026-05-09
915

1016
### Added

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "open-webui",
3-
"version": "0.9.3",
3+
"version": "0.9.4",
44
"private": true,
55
"scripts": {
66
"dev": "npm run pyodide:fetch && vite dev --host",

src/lib/components/chat/Chat.svelte

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1463,6 +1463,29 @@
14631463
top: messagesContainerElement.scrollHeight,
14641464
behavior
14651465
});
1466+
1467+
// content-visibility: auto causes the initial scrollHeight to be based on
1468+
// estimated sizes (contain-intrinsic-size). After we scroll, previously
1469+
// off-screen messages become visible and the browser resolves their actual
1470+
// heights, which shifts scrollHeight. Re-layouts can cascade across frames
1471+
// (new sizes reveal more content, triggering further size resolution), so
1472+
// we re-scroll across two animation frames to land at the true bottom.
1473+
requestAnimationFrame(() => {
1474+
if (messagesContainerElement) {
1475+
messagesContainerElement.scrollTo({
1476+
top: messagesContainerElement.scrollHeight,
1477+
behavior
1478+
});
1479+
requestAnimationFrame(() => {
1480+
if (messagesContainerElement) {
1481+
messagesContainerElement.scrollTo({
1482+
top: messagesContainerElement.scrollHeight,
1483+
behavior
1484+
});
1485+
}
1486+
});
1487+
}
1488+
});
14661489
}
14671490
};
14681491

src/lib/components/chat/Messages.svelte

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,16 @@
140140
141141
const scrollToBottom = () => {
142142
const element = document.getElementById('messages-container');
143-
element.scrollTop = element.scrollHeight;
143+
if (element) {
144+
element.scrollTop = element.scrollHeight;
145+
146+
// Follow-up scroll to account for content-visibility: auto re-layouts
147+
requestAnimationFrame(() => {
148+
if (element) {
149+
element.scrollTop = element.scrollHeight;
150+
}
151+
});
152+
}
144153
};
145154
146155
export const scrollToTop = async () => {

0 commit comments

Comments
 (0)