Skip to content

Commit c2ab30b

Browse files
committed
replace classList.toggle( ..., force ) as it's broken in ff
1 parent 4c57ad9 commit c2ab30b

File tree

2 files changed

+15
-4
lines changed

2 files changed

+15
-4
lines changed

js/reveal.js

+13-2
Original file line numberDiff line numberDiff line change
@@ -354,8 +354,19 @@ var Reveal = (function(){
354354
dom.controls.style.display = ( config.controls && dom.controls ) ? 'block' : 'none';
355355
dom.progress.style.display = ( config.progress && dom.progress ) ? 'block' : 'none';
356356

357-
dom.wrapper.classList.toggle( 'rtl', config.rtl );
358-
dom.wrapper.classList.toggle( 'center', config.center );
357+
if( config.rtl ) {
358+
dom.wrapper.classList.add( 'rtl' );
359+
}
360+
else {
361+
dom.wrapper.classList.remove( 'rtl' );
362+
}
363+
364+
if( config.center ) {
365+
dom.wrapper.classList.add( 'center' );
366+
}
367+
else {
368+
dom.wrapper.classList.remove( 'center' );
369+
}
359370

360371
if( config.mouseWheel ) {
361372
document.addEventListener( 'DOMMouseScroll', onDocumentMouseScroll, false ); // FF

0 commit comments

Comments
 (0)