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/issue 661 unmounting bug #692

Merged
merged 2 commits into from Jun 19, 2019
Merged

Conversation

narinluangrath
Copy link
Contributor

Description

Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.

Another one liner fix. We use setInterval to pan through the slides automatically (if the user sets the autoplay and autoplayOnStart props). We just forgot to run clearInterval if the component unmounts. Consequently, _nextSlide keeps getting run even when the Deck is unmounted, leading to some weird behavior if Deck gets mounted again.

Fixes #661

Type of Change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

You can reproduce the problem here: #661
To prove the fix worked I did the following:

  • cd into spectacle-bug-demo
  • change the package.json to "spectacle": "FormidableLabs/spectacle#bug/issue-661-unmounting-bug"
  • cd into node_modules/spectacle
  • yarn install && yarn build
  • startup the demo and the bug is fixed

I also added a test to Manager.js

Copy link
Contributor

@kale-stew kale-stew left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚢

@narinluangrath narinluangrath merged commit f76d3bc into master Jun 19, 2019
@narinluangrath narinluangrath deleted the bug/issue-661-unmounting-bug branch June 19, 2019 16:26
@glassblowerscat
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.

No-op when slideshow is programmatically unmounted
3 participants