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: Register hashchange event more cautiously. #165

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Fix: Register hashchange event more cautiously. #165

wants to merge 1 commit into from

Conversation

JohnRandom
Copy link

Registering a callback for the "hashchange" event should not occur, before the $.deck plugin was used by the consumer. Otherwise it will be executed, even if there are no slides to actually operate on.

I experienced this behaviour (let's call it a bug) in an app where hash changes did occur before the deck plugin was initialised. This seems to be limited to single page apps, where a dependency can be loaded, before $.deck( ... ) was being called.

Registering a callback for the "hashchange" event should not occur,
before the $.deck plugin was used by the consumer. Otherwise it will
be executed, even if there are no slides to actually operate on.
@JohnRandom JohnRandom changed the title Register hashchange event more cautiously. Fix: Register hashchange event more cautiously. Apr 24, 2014
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.

1 participant