I'm trying to simulate the ScrollIntoView Javascript capability in lightning. I tried to use the ui:scrollerWrapper for the same but it's not working and it's not scrolling up to the ui:scrollWrapper at the top. Any ideas/advise would be appreciated.

<ui:scrollerWrapper aura:id="scroll" >
        This is block 1
<div class="block1">
    This is block 2
<div class="block1">
    This is block 3
<div class="block1">
    This is block 4
<div class="block1">
    This is block 5
<lightning:button variant="neutral" label="Scroll up" title="Base action" onclick="{! c.handleClick }"/>

handleClick : function(component, event, helper) {

    let s1 = component.find("scroll");
    console.log('s1', s1)

  • according to the docs ui:scrollerWrapper should work only in Salesforce Mobile App - not in desktop – Itai Shmida Dec 10 '18 at 9:54

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.