Skip to content

Commit

Permalink
In case we are setting the scroll position manually and there is sche…
Browse files Browse the repository at this point in the history
…duled _onScroll callback for trailing end of interval - cancel it to not report old scroll position to parent component (#210)
  • Loading branch information
artemdanylenko authored and erictraut committed Aug 18, 2017
1 parent bc97043 commit c36202f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/web/ScrollView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,7 @@ export class ScrollView extends ViewBase<Types.ScrollViewProps, {}> implements R
if (!container) {
return;
}
this._onScroll.cancel();
if (animate) {
const start = container.scrollTop;
const change = scrollTop - start;
Expand Down Expand Up @@ -304,6 +305,7 @@ export class ScrollView extends ViewBase<Types.ScrollViewProps, {}> implements R
if (!container) {
return;
}
this._onScroll.cancel();
if (animate) {
const start = container.scrollLeft;
const change = scrollLeft - start;
Expand Down

0 comments on commit c36202f

Please sign in to comment.