Skip to content

Commit

Permalink
Only show resume on pause if controls enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
anderslemke committed Aug 15, 2018
1 parent 67aa713 commit 1aed4df
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions js/reveal.js
Original file line number Diff line number Diff line change
Expand Up @@ -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', '<button class="resume-button">Resume presentation</button>' );
dom.resumeButton = dom.pauseOverlay.querySelector( '.resume-button' );
dom.pauseOverlay = createSingletonNode( dom.wrapper, 'div', 'pause-overlay', config.controls ? '<button class="resume-button">Resume presentation</button>' : null );

dom.wrapper.setAttribute( 'role', 'application' );

Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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 );
Expand Down

0 comments on commit 1aed4df

Please sign in to comment.