Topic:   How to auto scroll on top of page in Lightning Component in Salesforce using CSS?
Feb 24, 2021 17:52 1 Replies 1013 Views RAMU

How to auto scroll on top of page in Lightning Component in Salesforce using CSS?

Prev Next
Topic Replies (1)
  1. 1
    idnkx user

    BASTIENAMY35

    To make the scrollTop = 0 to work the container div has to have an internal scroll. Which we can get by either giving a height via px or via vh.
    Try that out it should work. I was facing a similar issue while adding LWC inside Flexi Page. The Flexi page has its own scroller but for that, the scrollTop doesn't work. But if we create a separate scroller at the top-level div then the scrollTop starts to work.

Leave a Reply
Guest User

Not sure what solution is right for you?

Choose the right one for you.
Get the help of the experts and find a solution that best suits your needs.


Let`s Connect