Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why does touch on mobile Safari cause animation to pause/slow down? #75

Open
richpixel opened this issue Oct 18, 2017 · 0 comments
Open

Comments

@richpixel
Copy link

I've setup 2 animated routes like so:

        <AnimatedRoute
          path="(/|^.+?index.html)" exact
          component={MainScreen}
          atEnter={{ offset: -100 }}
          atLeave={{ offset: -100 }}
          atActive={{ offset: 0 }}
          className="switch-wrapper"
          mapStyles={mapStyles}
        />
        <AnimatedRoute
          path="/results"
          component={ResultsScreen}
          atEnter={{ offset: 100 }}
          atLeave={{ offset: 100 }}
          atActive={{ offset: 0 }}
          className="switch-wrapper"
          mapStyles={mapStyles}
        />

These work perfectly until running on iOS/Safari... I'm triggering the animation with a swipe left. However, if I keep my finger down after the animation has started running, for some reason it pauses and then appears tied to the motion of my finger. This actually would be a nice effect, however after I let go the animation completes with a 'jittery' finish. I was able to disable this effect by adding:

onTouchStart={e => e.preventDefault()}

to the div that accepts the swipe gesture. However I'm wondering if this feature is documented anywhere or is preventable? Or is this a feature of React Motion?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant