Skip to content

Commit

Permalink
Fix #118 premature animation stop
Browse files Browse the repository at this point in the history
  • Loading branch information
arusak committed Nov 20, 2017
1 parent f9288d9 commit 0980539
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/lib/perfect-scrollbar.directive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,9 @@ export class PerfectScrollbarDirective implements OnDestroy, DoCheck, OnChanges,
if (scrollCount >= Math.PI) {
this.animateScrolling(target, value, 0);
} else {
this.elementRef.nativeElement[target] = oldValue = newValue;
this.elementRef.nativeElement[target] = newValue;
// On a zoomed out page in Chrome the resulting offset may differ from the specified value
oldValue = this.elementRef.nativeElement[target];

this.ps.update();

Expand Down

0 comments on commit 0980539

Please sign in to comment.