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 (microsoft#210)
  • Loading branch information
artemdanylenko authored and berickson1 committed Oct 22, 2018
1 parent 0d4fed4 commit c8e536b
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 c8e536b

Please sign in to comment.