mirror of
https://github.com/open-webui/open-webui.git
synced 2026-07-09 16:09:10 +00:00
commit
f51d2b026f
5 changed files with 42 additions and 4 deletions
|
|
@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
|
|||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
||||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||
|
||||
## [0.9.4] - 2026-05-09
|
||||
|
||||
### Fixed
|
||||
|
||||
- 📜 **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.
|
||||
|
||||
## [0.9.3] - 2026-05-09
|
||||
|
||||
### Added
|
||||
|
|
|
|||
4
package-lock.json
generated
4
package-lock.json
generated
|
|
@ -1,12 +1,12 @@
|
|||
{
|
||||
"name": "open-webui",
|
||||
"version": "0.9.3",
|
||||
"version": "0.9.4",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "open-webui",
|
||||
"version": "0.9.3",
|
||||
"version": "0.9.4",
|
||||
"dependencies": {
|
||||
"@azure/msal-browser": "^4.5.0",
|
||||
"@codemirror/lang-javascript": "^6.2.2",
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "open-webui",
|
||||
"version": "0.9.3",
|
||||
"version": "0.9.4",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"dev": "npm run pyodide:fetch && vite dev --host",
|
||||
|
|
|
|||
|
|
@ -1463,6 +1463,29 @@
|
|||
top: messagesContainerElement.scrollHeight,
|
||||
behavior
|
||||
});
|
||||
|
||||
// content-visibility: auto causes the initial scrollHeight to be based on
|
||||
// estimated sizes (contain-intrinsic-size). After we scroll, previously
|
||||
// off-screen messages become visible and the browser resolves their actual
|
||||
// heights, which shifts scrollHeight. Re-layouts can cascade across frames
|
||||
// (new sizes reveal more content, triggering further size resolution), so
|
||||
// we re-scroll across two animation frames to land at the true bottom.
|
||||
requestAnimationFrame(() => {
|
||||
if (messagesContainerElement) {
|
||||
messagesContainerElement.scrollTo({
|
||||
top: messagesContainerElement.scrollHeight,
|
||||
behavior
|
||||
});
|
||||
requestAnimationFrame(() => {
|
||||
if (messagesContainerElement) {
|
||||
messagesContainerElement.scrollTo({
|
||||
top: messagesContainerElement.scrollHeight,
|
||||
behavior
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -140,7 +140,16 @@
|
|||
|
||||
const scrollToBottom = () => {
|
||||
const element = document.getElementById('messages-container');
|
||||
element.scrollTop = element.scrollHeight;
|
||||
if (element) {
|
||||
element.scrollTop = element.scrollHeight;
|
||||
|
||||
// Follow-up scroll to account for content-visibility: auto re-layouts
|
||||
requestAnimationFrame(() => {
|
||||
if (element) {
|
||||
element.scrollTop = element.scrollHeight;
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
export const scrollToTop = async () => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue