aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBartek Szopka <bartek.szopka+github@gmail.com>2012-03-10 23:11:56 +0000
committerBartek Szopka <bartek.szopka+github@gmail.com>2012-03-10 23:14:40 +0000
commit5fd0f58fc6c89e556410d07a54997cabc48b2c14 (patch)
treea9094acd9b77eb139fdb2d34076f260a48e1ae33
parentb23506e885d33b53191dc0675c0a05585895a24a (diff)
downloadimpress.js-5fd0f58fc6c89e556410d07a54997cabc48b2c14.tar.gz
"`present` and `past` can't appear together on element"
-rw-r--r--js/impress.js7
1 files changed, 4 insertions, 3 deletions
diff --git a/js/impress.js b/js/impress.js
index 6681d36..232fe1b 100644
--- a/js/impress.js
+++ b/js/impress.js
@@ -429,12 +429,13 @@
step.classList.add("future");
});
- document.addEventListener("impressStepEnter", function (event) {
+ root.addEventListener("impressStepEnter", function (event) {
+ event.target.classList.remove("past");
event.target.classList.remove("future");
event.target.classList.add("present");
}, false);
- document.addEventListener("impressStepLeave", function (event) {
+ root.addEventListener("impressStepLeave", function (event) {
event.target.classList.remove("present");
event.target.classList.add("past");
}, false);
@@ -447,7 +448,7 @@
// and it has to be set after animation finishes, because in Chrome it
// causes transtion being laggy
// BUG: http://code.google.com/p/chromium/issues/detail?id=62820
- document.addEventListener("impressStepEnter", function (event) {
+ root.addEventListener("impressStepEnter", function (event) {
window.location.hash = "#/" + event.target.id;
}, false);