Skip to content

Customer chat: jump-to-bottom clears unread markers before the scroll finishes #1375

Description

@marassteiner

Follow-up from #1297 (not a merge blocker).

Evidence

src/screens/chat.screen.tsx:187 (scrollToBottom) calls scrollIntoView({ behavior: 'smooth' }) and then immediately clearUnreadMarkers().

If the customer interrupts the animation (touch, wheel, resize), they can remain above the new messages while the New divider and unread count are already gone. A programmatic scroll can also flip isNearBottomRef mid-animation and treat the next arrival as unread.

Suggested fix

Clear unread markers only when handleThreadScroll observes isScrollNearBottom(...) === true. Keep “auto-following” distinct from a deliberate scroll-up.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions