Skip to content

Commit 14eb2fd

Browse files
mhartingtonadamdbradley
authored andcommitted
fix(scroll): handle low duration in scrollTo
1 parent 64346bd commit 14eb2fd

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/util/scroll-view.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -421,6 +421,13 @@ export class ScrollView {
421421
return promise;
422422
}
423423

424+
if (duration < 32) {
425+
self.setTop(y);
426+
self.setLeft(x);
427+
done();
428+
return promise;
429+
}
430+
424431
x = x || 0;
425432
y = y || 0;
426433

0 commit comments

Comments
 (0)