Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
native scroll does not update getScrollPosition() unless scroll event is issued #6506
Note: If you are having problems formatting your issue please refer to this article on using markdown in Github:
Note: for support questions, please use one of these channels:
Short description of the problem:
I have a timer check the position of an ion-scroll. I trace this to the screen. I need the realtime top/left values to compute other actions. This works fine in the browser using trackpad, however, on iOS, the value is only updated intermittently, which causes jumping and inconsistent behavior for my other maths. It seems to only update when the user is actively dragging, that is, it does not take into account the deceleration.
What behavior are you expecting?
I would expect it to be a continuous value when called from a
the getScrollPosition() should be continuously updated.
Steps to reproduce:
Other information: (e.g. stacktraces, related issues, suggestions how to fix, stackoverflow links, forum links, etc)
Which Ionic Version? 1.2.4
Plunker that shows an example of your issue
can't plunker, it's iOS only.
I see that
I may have a hacky workaround which is to simply measure the window-relative position of an element at [0,0] in the scroll area with the js api,
Even calling DOM API functions like
I would be satisfied if we could simply bubble this iOS UIScrollView property to ionic. How might I do that myself?