From 8cd464a92660b311d9d40894f0b43b2ef191e0a1 Mon Sep 17 00:00:00 2001 From: Bartek Szopka Date: Thu, 12 Jan 2012 21:31:18 +0100 Subject: [PATCH] yeah, that's what happens when you do quick fixes using timeouts... --- js/impress.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/js/impress.js b/js/impress.js index c3d8e5a30..913504c67 100644 --- a/js/impress.js +++ b/js/impress.js @@ -185,6 +185,7 @@ // making given step active var active = null; + var hashTimeout = null; var select = function ( el ) { if ( !el || !el.stepData || el == active) { @@ -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);