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

Fix a crash with resize when the autoplay has gone away during timeout #6431

Merged
merged 1 commit into from
Feb 25, 2023
Merged

Fix a crash with resize when the autoplay has gone away during timeout #6431

merged 1 commit into from
Feb 25, 2023

Conversation

aub
Copy link
Contributor

@aub aub commented Feb 24, 2023

We had a crash this morning that you can see below:

Screenshot 2023-02-24 at 8 49 24 AM

I think what's happening is that:

  • A resize occurs
  • This schedules a timeout to resume the autoplay, checking that it should do so before scheduling the timeout
  • Before the timeout's callback fires, the autoplay goes away, presumably because the user has moved on to a different page
  • The timeout fires and does not check again for the existence of the autoplay, which causes the crash

This just duplicates the check for needing to resume the autoplay within the callback. I debated about whether all three checks were needed but went for the maximal approach just to be sure... happy to tweak that if needed.

@nolimits4web nolimits4web merged commit adb40f4 into nolimits4web:master Feb 25, 2023
@nolimits4web
Copy link
Owner

Thanks!

@dovudbek7
Copy link

👍

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 this pull request may close these issues.

3 participants