Topic:   How to auto scroll on top of page in Lightning Component in Salesforce using CSS?
Feb 24, 2021 11:52 1 Replies 39 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

    LALITH

    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 course is right for you?

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


Let`s Connect