8000 WriteURL causes hashchange event which unnecessarily calls slide() a second time · Issue #529 · hakimel/reveal.js · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

WriteURL causes hashchange event which unnecessarily calls slide() a second time #529

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

Closed
gmp opened this issue Jul 19, 2013 · 1 comment
Closed

Comments

@gmp
Copy link
gmp commented Jul 19, 2013

When the delayed call to writeURL runs, it updates the window URL that triggers a 'hashchange' event, which in turn causes slide() and therefore updateSlides() to run a second time.

For example, when the page loads, slide() is called and then 1500ms later writeURL updates the URL hash to the current slide index. This causes readURL to call slide() again.

I could be missing something, but I don't believe this second call to slide() is necessary if the slide hasn't actually been updated--just the URL hash to reflect the current position.

@hakimel
Copy link
Owner
hakimel commented Jul 19, 2013

Was looking at #530 and decided to check this out too. I've added a fix to the dev branch and as far as I can tell from some basic testing it's working well. 8dcf324

@hakimel hakimel closed this as completed Jul 19, 2013
hakimel added a commit that referenced this issue Jul 21, 2013
enovajuan pushed a commit to enovajuan/reveal.js that referenced this issue Dec 2, 2014
enovajuan pushed a commit to enovajuan/reveal.js that referenced this issue Dec 2, 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

No branches or pull requests

2 participants
0