PolymerElements / paper-drawer-panel

A Material Design two-section responsive panel
https://www.webcomponents.org/element/PolymerElements/paper-drawer-panel
25 stars 42 forks source link

Animation renders twice when swiping in safari #159

Open rubenstolk opened 7 years ago

rubenstolk commented 7 years ago

Description

When swiping the bar in our out, and then "letting it go", the animation restarts.

Issue only applies to v1.0.11

Expected outcome

The animation to continue swiping in or out.

Actual outcome

The animation restarts from the beginning.

Live Demo

Steps to reproduce

Browsers Affected

t-soares commented 7 years ago

The PR #158 introduced a regression on this component. The PR #158 changed the drawer opening and closing to be done inside a requestAnimationFrame. At the end of a swipe movement, the width is reset outside the rAF block, causing the opening/closing animation to be started from the initial position.