delay hash changes to avoid transition lag in chrome and enable history by default...
authorHakim El Hattab <hakim.elhattab@gmail.com>
Sat, 24 Mar 2012 16:36:34 +0000 (12:36 -0400)
committerHakim El Hattab <hakim.elhattab@gmail.com>
Sat, 24 Mar 2012 16:36:34 +0000 (12:36 -0400)
index.html
js/reveal.js

index 808f0c03155bf3e622cad5186f4c5f18f8decc81..1518eb956224bbab89b46f5a09be13a5f2b56425 100644 (file)
                                progress: true,
 
                                // If true; each slide will be pushed to the browser history
-                               history: false,
+                               history: true,
 
                                // Flags if mouse wheel navigation should be enabled
                                mouseWheel: true,
index ba2cfd5ecabe7d5b337197d615a851ff963a4bc2..2ecd641e5a76d15f6b83f9f0bac9d81ac9d225e6 100644 (file)
@@ -74,7 +74,10 @@ var Reveal = (function(){
                                        document.body.style['OTransform'] !== undefined,
                
                // Throttles mouse wheel navigation
-               mouseWheelTimeout = 0;
+               mouseWheelTimeout = 0,
+
+               // Delays updates to the URL due to a Chrome thumbnailer bug
+               writeURLTimeout = 0;
        
        /**
         * Starts up the slideshow by applying configuration
@@ -490,7 +493,8 @@ var Reveal = (function(){
 
                updateControls();
                
-               writeURL();
+               clearTimeout( writeURLTimeout );
+               writeURLTimeout = setTimeout( writeURL, 1500 );
        }
 
        /**