fix(convai-widget-core): auto-scroll on transcript usually stops scrolling #353
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The
onScrollon the transcript scroll container is triggering for both automated and manual scrolls.It looks like the
isAtBottomheuristic can becomefalsevia the automated means of the transcript container size changing and the smart scroll falling behind.onWheel is only triggered on manual user events, but admittedly isn't all-encompassing. This is simple and is better than where it was, though.
An alternative I thought of would be to keep a ref of the previous scroll Y, and then cancel automatic scroll if we detect it going up. Happy to try that out if we really don't like onWheel.
Before:
Screen Recording 2025-11-13 at 2.30.08 PM.zip
After:
Screen Recording 2025-11-13 at 2.43.30 PM.zip