Skip to content

Commit

Permalink
delaying hash change not to spoil the transition in chrome
Browse files Browse the repository at this point in the history
  • Loading branch information
bartaz committed Jan 12, 2012
1 parent 3b5fd44 commit 65c456c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion js/impress.js
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,12 @@

// `#/step-id` is used instead of `#step-id` to prevent default browser
// scrolling to element in hash
window.location.hash = "#/" + el.id;
//
// and it has to be set after animation finishes, because in chrome it
// causes transtion being laggy
window.setTimeout(function () {
window.location.hash = "#/" + el.id;
}, 1000);

var target = {
rotate: {
Expand Down

0 comments on commit 65c456c

Please sign in to comment.