From 1aed4df37c04049065ba2c15d8cbfea841cd0982 Mon Sep 17 00:00:00 2001 From: anderslemke Date: Wed, 15 Aug 2018 19:45:48 +0200 Subject: [PATCH] Only show resume on pause if controls enabled --- js/reveal.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/js/reveal.js b/js/reveal.js index 3c31b973774..b071cc33e6a 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -593,8 +593,7 @@ dom.speakerNotes.setAttribute( 'tabindex', '0' ); // Overlay graphic which is displayed during the paused mode - dom.pauseOverlay = createSingletonNode( dom.wrapper, 'div', 'pause-overlay', '' ); - dom.resumeButton = dom.pauseOverlay.querySelector( '.resume-button' ); + dom.pauseOverlay = createSingletonNode( dom.wrapper, 'div', 'pause-overlay', config.controls ? '' : null ); dom.wrapper.setAttribute( 'role', 'application' ); @@ -1299,7 +1298,7 @@ dom.progress.addEventListener( 'click', onProgressClicked, false ); } - dom.resumeButton.addEventListener( 'click', resume, false ); + dom.pauseOverlay.addEventListener( 'click', resume, false ); if( config.focusBodyOnPageVisibilityChange ) { var visibilityChange; @@ -1364,7 +1363,7 @@ dom.wrapper.removeEventListener( 'touchmove', onTouchMove, false ); dom.wrapper.removeEventListener( 'touchend', onTouchEnd, false ); - dom.resumeButton.removeEventListener( 'click', resume, false ); + dom.pauseOverlay.removeEventListener( 'click', resume, false ); if ( config.progress && dom.progress ) { dom.progress.removeEventListener( 'click', onProgressClicked, false );