Skip to content
Commit 647442a4 authored by Lukas Eipert's avatar Lukas Eipert
Browse files

fix(DuoChat): Stick to bottom of history while streaming answers

Browsers a are pretty good at keeping the focus on an element while
the parent element grows in size. With this we mark all child elements
of the chat history as "non" anchors.

Right at the bottom of the chat history we add a scroll-anchor element.
This scroll-anchor element is the only "possible" anchor. The beauty of
it: It only will be used as an anchor _if_ it is it is currently inside
the view port.

So if the user manually scrolls up while a chunked message is coming in,
it won't stick to the bottom while the message still loads.

See: https://developer.mozilla.org/en-US/docs/Web/CSS/overflow-anchor
parent 07a8a43b
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment