From: Rick Lupton Date: Fri, 14 Jun 2013 14:03:54 +0000 (+0100) Subject: Fix navigatePrev() past beginning of stack: fixes issue #463.#463.#463. X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=510839ab04a46005319480d99c1e676d6881e213;p=reveal.js.git Fix navigatePrev() past beginning of stack: fixes issue #463.#463.#463. Previously navigatePrev() was changing indexh and indexv; instead should call slide(h, v) and let it change indexh and indexv. --- diff --git a/js/reveal.js b/js/reveal.js index a4a71db..51b84ea 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -1758,9 +1758,9 @@ var Reveal = (function(){ var previousSlide = document.querySelector( HORIZONTAL_SLIDES_SELECTOR + '.past:nth-child(' + indexh + ')' ); if( previousSlide ) { - indexv = ( previousSlide.querySelectorAll( 'section' ).length + 1 ) || undefined; - indexh --; - slide( indexh, indexv ); + var v = ( previousSlide.querySelectorAll( 'section' ).length - 1 ) || undefined, + h = indexh - 1; + slide( h, v ); } } }