Commit 14748a08 authored by John Lee's avatar John Lee Committed by Commit Bot

WebUI Tab Strip: Fix swiping up bug that replays the entire animation

Previously, if a user swiped up the full 200px and released, the
animation would re-play from the very beginning.

Bug: 1014679
Change-Id: I6810fd371d375b812e206b9e6e8067a5644bf86e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1910872Reviewed-by: default avatarDemetrios Papadopoulos <dpapad@chromium.org>
Commit-Queue: John Lee <johntlee@chromium.org>
Cr-Commit-Position: refs/heads/master@{#714594}
parent 2653f470
......@@ -227,7 +227,7 @@ export class TabSwiper {
(event.timeStamp - this.currentPointerDownEvent_.timeStamp)) >
SWIPE_VELOCITY_THRESHOLD;
if (pixelsSwiped === SWIPE_FINISH_THRESHOLD_PX) {
if (Math.abs(pixelsSwiped) === SWIPE_FINISH_THRESHOLD_PX) {
// The user has swiped the max amount of pixels to swipe and the animation
// has already completed all its keyframes, so just fire the onfinish
// events on the animation.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment