Skip to content

Commit

Permalink
yeah, that's what happens when you do quick fixes using timeouts...
Browse files Browse the repository at this point in the history
  • Loading branch information
bartaz committed Jan 12, 2012
1 parent c5b1127 commit 8cd464a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion js/impress.js
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,7 @@
// making given step active

var active = null;
var hashTimeout = null;

var select = function ( el ) {
if ( !el || !el.stepData || el == active) {
Expand Down Expand Up @@ -216,7 +217,8 @@
//
// and it has to be set after animation finishes, because in chrome it
// causes transtion being laggy
window.setTimeout(function () {
window.clearTimeout( hashTimeout );
hashTimeout = window.setTimeout(function () {
window.location.hash = "#/" + el.id;
}, 1000);

Expand Down

0 comments on commit 8cd464a

Please sign in to comment.