From ccdb4ff248c9883c3f2e922e243ec426a918bfcb Mon Sep 17 00:00:00 2001 From: Ira Abramov Date: Sat, 11 Oct 2014 18:59:36 +0300 Subject: Fix RTL Navigation with space bar --- js/reveal.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'js') diff --git a/js/reveal.js b/js/reveal.js index a0b92ac..52cc615 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -3432,6 +3432,9 @@ if( previousSlide ) { var v = ( previousSlide.querySelectorAll( 'section' ).length - 1 ) || undefined; var h = indexh - 1; + if( config.rtl ) { + h = indexh + 1; + } slide( h, v ); } } @@ -3446,7 +3449,11 @@ // Prioritize revealing fragments if( nextFragment() === false ) { - availableRoutes().down ? navigateDown() : navigateRight(); + if( config.rtl ) { + availableRoutes().down ? navigateDown() : navigateLeft(); + } else { + availableRoutes().down ? navigateDown() : navigateRight(); + } } // If auto-sliding is enabled we need to cue up -- cgit v1.2.3