Browse Source

prevent missing 'present' class when navigating to same slide twice

Hakim El Hattab 6 years ago
parent
commit
511397c177
1 changed files with 1 additions and 1 deletions
  1. 1 1
      js/reveal.js

+ 1 - 1
js/reveal.js

@@ -2480,7 +2480,7 @@
 		// Solves an edge case where the previous slide maintains the
 		// Solves an edge case where the previous slide maintains the
 		// 'present' class when navigating between adjacent vertical
 		// 'present' class when navigating between adjacent vertical
 		// stacks
 		// stacks
-		if( previousSlide ) {
+		if( previousSlide && previousSlide !== currentSlide ) {
 			previousSlide.classList.remove( 'present' );
 			previousSlide.classList.remove( 'present' );
 			previousSlide.setAttribute( 'aria-hidden', 'true' );
 			previousSlide.setAttribute( 'aria-hidden', 'true' );