How to stop scrolling during scroll event?


#1

Hi everyone,

When ion-content is scrolling and I click scrollToTop(). It goes to top first, and then jump back to where it was. I think it’s because the previous scrolling is not finished, so it continues after scrollToTop() finished… How can I fix this? Is there a way to stop ion-content scrolling during scroll event?

Thanks!

Here is my code for scroll to top:

in ts file:

import {  Content  } from 'ionic-angular';

...

export class TodayDealsPage {

	@ViewChild(Content) content: Content;

...

	ionSelected() {
	    this.content.scrollToTop();
	}
}