Commit f257138
fix(chat): prevent auto-scroll from overriding user scroll
When users scroll up to view earlier content in the chat, the auto-scroll timer would keep pulling them back to the bottom. This was caused by the restart condition incorrectly triggering when users were not at the bottom.
Changes:
- Add userScrolledAway flag to track when user scrolls away from bottom
- Stop auto-scroll timer when user scrolls away
- Only restart auto-scroll when user manually scrolls back to bottom
- Simplify threshold calculation with isNearBottom variable1 parent 18935b0 commit f257138
1 file changed
+16
-11
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
569 | 569 | | |
570 | 570 | | |
571 | 571 | | |
| 572 | + | |
| 573 | + | |
572 | 574 | | |
573 | 575 | | |
574 | 576 | | |
| |||
588 | 590 | | |
589 | 591 | | |
590 | 592 | | |
591 | | - | |
592 | | - | |
593 | | - | |
594 | | - | |
| 593 | + | |
| 594 | + | |
| 595 | + | |
| 596 | + | |
| 597 | + | |
| 598 | + | |
| 599 | + | |
| 600 | + | |
| 601 | + | |
595 | 602 | | |
596 | 603 | | |
597 | 604 | | |
598 | 605 | | |
599 | 606 | | |
600 | | - | |
601 | | - | |
602 | | - | |
603 | | - | |
604 | | - | |
605 | | - | |
606 | | - | |
| 607 | + | |
| 608 | + | |
| 609 | + | |
| 610 | + | |
| 611 | + | |
607 | 612 | | |
608 | 613 | | |
609 | 614 | | |
| |||
0 commit comments