chat: tweak distancefrombottom

This commit is contained in:
Kyle Drake 2024-04-21 14:16:43 -05:00
parent 781ad6512f
commit 3d9cd560c5

View file

@ -132,7 +132,7 @@ Maintain a friendly, patient, supportive tone. Prioritize the user's learning an
const distanceFromBottom = chatBox.scrollHeight - chatBox.scrollTop - chatBox.clientHeight;
// If the distance from the bottom is small (or zero), the user is at the bottom
if (distanceFromBottom < 1) {
if (distanceFromBottom < 5) {
shouldAutoScroll = true;
} else {
// If the user has scrolled up, disable auto-scrolling