aboutsummaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorHakim El Hattab <hakim.elhattab@gmail.com>2013-02-02 22:28:28 -0800
committerHakim El Hattab <hakim.elhattab@gmail.com>2013-02-02 22:28:28 -0800
commitabf9ddb588c11bd0591b4835c5adcb77609fa1ce (patch)
treec3c17d632b23349fc9ee9543ff3f9d89a0bb6c12 /js
parentf45d94850f5130126a30ebcbc3bb11ccec10ad39 (diff)
parentf0b93d895b519d00e60438f41fdf9fbf453a8f95 (diff)
downloadfreenode-live-2017-presentation-abf9ddb588c11bd0591b4835c5adcb77609fa1ce.tar
freenode-live-2017-presentation-abf9ddb588c11bd0591b4835c5adcb77609fa1ce.tar.gz
Merge pull request #322 from commadelimited/deactivate-nav-during-pause
Only allow 'unpause' keyboard events while paused
Diffstat (limited to 'js')
-rw-r--r--js/reveal.js9
1 files changed, 7 insertions, 2 deletions
diff --git a/js/reveal.js b/js/reveal.js
index 6ee0156..ccb009f 100644
--- a/js/reveal.js
+++ b/js/reveal.js
@@ -632,7 +632,7 @@ var Reveal = (function(){
continue;
}
- // Vertical stacks are not centered since their section
+ // Vertical stacks are not centered since their section
// children will be
if( slide.classList.contains( 'stack' ) ) {
slide.style.top = 0;
@@ -663,7 +663,7 @@ var Reveal = (function(){
}
/**
- * Retrieves the vertical index which was stored using
+ * Retrieves the vertical index which was stored using
* #setPreviousVerticalIndex() or 0 if no previous index
* exists.
*
@@ -1549,6 +1549,11 @@ var Reveal = (function(){
var triggered = true;
+ // while paused only allow "unpausing" keyboard events (b and .)
+ if (isPaused() && [66,190,191].indexOf(event.keyCode) === -1 ) {
+ return false;
+ }
+
switch( event.keyCode ) {
// p, page up
case 80: case 33: navigatePrev(); break;