• John Lee's avatar
    WebUI Tab Strip: Reset swipe animation on pointerdown · d37db53d
    John Lee authored
    If a swipe gesture gets canceled by a pointerleave event, the
    animation needs to be reset. If it is not reset, the next pointerup
    event will calculate the pixels swiped and the velocity based on
    an animation time from a previous gesture.
    
    This occurs most frequently in cases where a user is swiping
    diagonally on the tab strip to scroll. The diagonal swipe causes the
    TabSwiper to map a few of the first initial pixels as a tab swipe,
    which gets canceled by a pointerleave event caused by the scroll.
    The next time the user taps on a TabElement, the pointerup event
    will do its calcs based on the previous diagonal swipe since the
    animation remains in a state modified by the diagonal swipe.
    
    Bug: 1014679
    Change-Id: I5ef44578f104152793af4c4750e4a493d7d908b3
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1913572Reviewed-by: default avatarDemetrios Papadopoulos <dpapad@chromium.org>
    Commit-Queue: John Lee <johntlee@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#715128}
    d37db53d
tab_swiper.js 7.79 KB