From 14eb2fde1d2dbbae0b5c9e961538d5b23c565be5 Mon Sep 17 00:00:00 2001 From: Mike Hartington Date: Wed, 4 Jan 2017 10:56:59 -0500 Subject: [PATCH] fix(scroll): handle low duration in scrollTo --- src/util/scroll-view.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/util/scroll-view.ts b/src/util/scroll-view.ts index 6966c8eae0b..ba1f78ef55c 100644 --- a/src/util/scroll-view.ts +++ b/src/util/scroll-view.ts @@ -421,6 +421,13 @@ export class ScrollView { return promise; } + if (duration < 32) { + self.setTop(y); + self.setLeft(x); + done(); + return promise; + } + x = x || 0; y = y || 0;