function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Sheida Saedifaez 14Sheida Saedifaez 14 

how do i disable pull to refresh in lightning component

I have developed a lightning component that runs on the Salesforce1 and most of the users have iPad. It involves filling out a rather complex form. I would like to disable the pull to refresh functionality. I used the example below from other post, but what it did it stopped all touch actions, like scroll down
...addEventListener("touchmove", function(e){
e.stopPropagation();
},false)

help please? thanks!
NagendraNagendra (Salesforce Developers) 

Hi Shelda,

In your .cmp file, add an aura: id to the top-level,
 

e.g. Then define the following renderer:

({
    afterRender : function(component, helper) {
       this.superAfterRender(); 
       var targetEl = component.find("mainapp").getElement();
       targetEl.addEventListener("touchmove", function(e) {
            e.stopPropagation();
        }, false); 
    }
})
Hope this helps.

Please mark this as solved if it's resolved.

Thanks,
Nagendra
 
Sheida Saedifaez 7Sheida Saedifaez 7
Thank you Nagendra. I did try that, but that stopped all touch movements including scrolling down to see the rest of the page. I only want to Pull to Refresh to be disabled.