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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Animations are being paused even with my focus still on the page #942

Open
georgekaran opened this issue Apr 5, 2023 · 3 comments 路 May be fixed by #943
Open

Animations are being paused even with my focus still on the page #942

georgekaran opened this issue Apr 5, 2023 · 3 comments 路 May be fixed by #943

Comments

@georgekaran
Copy link

georgekaran commented Apr 5, 2023

Do you want to request a feature or report a bug?
BUG 馃悶

What is the current behavior?
Toast animations are being paused even with my focus still on the page.

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem. Your bug will get fixed much faster if we can run your code and it doesn't have dependencies other than React. Paste the link to your CodeSandbox (https://codesandbox.io/s/new) example below:

  1. Open sandbox: https://codesandbox.io/s/red-rgb-whcuxv?file=/index.js
  2. Select any option inside the selector
  3. Select another option inside the selector
  4. See how the first notification will stop running even with my focus still on the page

What is the expected behavior?
The animation on the first notification should not be paused.

Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?

React 18.2

Chrome 111 and Firefox 111

@georgekaran georgekaran linked a pull request Apr 5, 2023 that will close this issue
@georgekaran
Copy link
Author

I submitted a PR for a more robust approach with Page Visibility API.

@rvieceli
Copy link

I had the same problem when using Radix UI popover with Portal Animations are paused until I close the popover.

@georgekaran
Copy link
Author

Hello @fkhadra, could you kindly check this out when you have a moment?

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

Successfully merging a pull request may close this issue.

2 participants