Skip to content

Chatbot scroll on custom step #133

Closed

Description

@ocherfas

On ChatBot.jsx you are attaching a scroll to button function on the event 'DOMNodeInserted' of the chatBot element.
That created some problem for us when we used custom components with ReactTooltip for instance, so the first time the tooltip created the whole chatbot would scroll to the bottom.
Eventually wrote a patch in our custom step to stopPropagation when such event triggered and it solved the problem.
I would try to find a different solution for what you tried to do there.

Activity

  1. changed the title [-]Chatbot scroll on custom strp[/-] [+]Chatbot scroll on custom step[/+] on Aug 22, 2018
  2. LucasBassetti commented on Aug 24, 2018

    @LucasBassetti
    Owner

    Hi,

    Thanks for the advice! If you have some good solution to that please let me know. 👍

  3. GilbertMizrahi commented on Dec 5, 2018

    @GilbertMizrahi

    ocherfas, How are you handling the scroll to bottom?
    Can you share?

  4. Bharathalapati3 commented on Feb 8, 2020

    @Bharathalapati3

    On ChatBot.jsx you are attaching a scroll to button function on the event 'DOMNodeInserted' of the chatBot element.
    That created some problem for us when we used custom components with ReactTooltip for instance, so the first time the tooltip created the whole chatbot would scroll to the bottom.
    Eventually wrote a patch in our custom step to stopPropagation when such event triggered and it solved the problem.
    I would try to find a different solution for what you tried to do there.

    ocherfas, How are you handling the scroll to bottom?
    Can you share?

    Can some share on how to handle scrolling?,I have a custom component for which I don't want to scroll to the buttom of the chatbot.

  5. DavidC0rtes commented on Oct 6, 2021

    @DavidC0rtes

    Hi, we encountered a similar problem, to prevent autoscroll to the last dom node this answer was helpful: https://stackoverflow.com/a/31063201

    passed in customStyle

  6. LucasBassetti commented on Sep 26, 2026

    @LucasBassetti
    Owner

    This is fixed in #392: autoscroll now uses a MutationObserver instead of the removed DOMNodeInserted event. A new message always scrolls to the bottom, and other DOM changes (tooltips, ripples, content loaded in custom steps) only scroll when the user hasn't scrolled up.

    It will be part of the next release. Closing, thanks for reporting!

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