From e9b874112e59c9220a8fe88805ba7fa0f874f65f Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Thu, 26 Jul 2012 23:22:15 -0400 Subject: [PATCH] fixes bug where the .present class remained on previous slide (closes #88) --- README.md | 1 + js/reveal.js | 9 ++++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index d2f36e7..c55a30c 100644 --- a/README.md +++ b/README.md @@ -182,6 +182,7 @@ You can change the appearance of the speaker notes by editing the file at `plugi - New API method ```Reveal.getPreviousSlide()``` - New API method ```Reveal.getCurrentSlide()``` - New API method ```Reveal.getIndices()``` +- Fixes bug where the ```.present``` class was sometimes left on the previous slide #### 1.4 - Main ```#reveal container``` is now selected via a class instead of ID diff --git a/js/reveal.js b/js/reveal.js index 3387904..8ae46b6 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -1,5 +1,5 @@ /*! - * reveal.js 1.5 r2 + * reveal.js 1.5 r3 * http://lab.hakim.se/reveal-js * MIT licensed * @@ -731,6 +731,13 @@ var Reveal = (function(){ // Ensure that the previous slide is never the same as the current previousSlide = null; } + + // Solves an edge case where the previous slide maintains the + // 'present' class when navigating between adjacent vertical + // stacks + if( previousSlide ) { + previousSlide.classList.remove( 'present' ); + } } /**