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

[BUG] svg viewBox property no longer animates after 7.6.11 #1807

Closed
willhindson opened this issue Dec 3, 2022 · 0 comments · Fixed by #1809
Closed

[BUG] svg viewBox property no longer animates after 7.6.11 #1807

willhindson opened this issue Dec 3, 2022 · 0 comments · Fixed by #1809
Labels
bug Something isn't working

Comments

@willhindson
Copy link

willhindson commented Dec 3, 2022

2. Describe the bug
Animating the svg viewBox property no longer works after framer motion 7.6.11 (release notes: "Treat <motion.svg /> components as HTML")

3. IMPORTANT: Provide a CodeSandbox reproduction of the bug
https://codesandbox.io/s/fervent-monad-s4eb9e?file=/src/App.js
Note — the svg is invisible, but if you click anywhere on the yellow and inspect you will see that the viewBox property on the svg animates, with framer motion 7.6.10 as a dependency (as it is in this codesandbox), if you change it to 7.6.11 or later, it will not animate.

4. Steps to reproduce

  1. Create an array of viewbox properties within the animate prop on a motion.svg element, i.e.
animate={{
        viewBox: [
          '0 0 360 100',
          '0 0 360 100',
          '0 -50 360 100',
          '0 -50 360 100',
          '-50 0 360 100',
          '-50 0 360 100',
          '-80 -60 360 100',
          '-100 -60 360 100',
        ],
      }}
  1. Check in the inspector to see it is working correctly, as it should on 7.6.10 and below
  2. Use any version of motion from 7.6.11 to 7.6.18 and the viewBox property will not animate

5. Expected behavior
The viewBox prop should animate between items in the array

7. Environment details
Mac os ventura 13.0.1, MS Edge 107.0.1418.68

@willhindson willhindson added the bug Something isn't working label Dec 3, 2022
@mergetron mergetron bot closed this as completed in #1809 Dec 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant