Quantcast
Channel: Ionic Framework - Ionic Forum
Viewing all articles
Browse latest Browse all 49526

How to stop scrolling during scroll event?

$
0
0

@mybluedog24 wrote:

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();
	}
}

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 49526

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>