WriteURL causes hashchange event which unnecessarily calls slide() a second time · Issue #529 · hakimel/reveal.js · GitHub
More Web Proxy on the site http://driver.im/
You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
gmp
added a commit
to gmp/reveal.js
that referenced
this issue
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
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.
The text was updated successfully, but these errors were encountered: