Scroll methods conflicts with user scroll gestures (edited)
Short description of the problem:
If a user scrolls(and releases the screen so the scroll slows down), and the method: "scrollToBottom / scrollToTop" gets called. the screen will flicker(the original gesture conflicts with the scrollToBottom()) . I made an example, buts it's only on IOS
What behavior are you expecting?
The current scroll action should end, and only the scrollToBottom action should scroll.
Steps to reproduce:
- I made a simple plnkr example; but it's only visible in ios: http://plnkr.co/edit/VXSsuiuShhbqTNMksSzo?p=preview
- Scroll, (release), and while the scroll slows down, press the scrolldown buttun (chat icon)
- you'll see that the current event will try to finish over the scrollToBottom method
Which Ionic Version? 1.x or 2.x ionic2 beta.9 / beta.10
Plunker that shows an example of your issue
(old example) http://plnkr.co/edit/VXSsuiuShhbqTNMksSzo?p=preview (new example) I created a blank ionic project, and created a github repo: https://github.com/thomas1511/ionicScrollProblem
Code which conflicts:
this.content.scrollToBottom(300);
Edit: Added video to show problem
https://youtu.be/3gF1En3xdl0
I've created a video do demonstrate the problem:
https://youtu.be/3gF1En3xdl0
In the first case, the srolldown works as expected. In the second case, while scrolling, the scrolldown functionality does not.
If Anyone has the same problem. The following code fixed the problem for me.
this.content.getScrollElement().style.overflow = 'hidden';
this.content.scrollToBottom();
setTimeout( () => {
this.content.getScrollElement().style.overflow = '';
}, 100);
Maybe it should be integrated in the scrollToBottom() functionality?
I've have also a problem with scrollToBottom only on ios. it doesnt work at all. i've created an example on a blank starter based. with nothing special only a scrollToBottom on Content.
https://github.com/bonoadil/blankDemo
NB : Easily reproducible and works fine in the browser & android.
@thomas1511 your fix doesnt work for me.
Thanks for the issue! This issue is being closed due to inactivity. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.
Thank you for using Ionic!