aboutsummaryrefslogtreecommitdiffhomepage
path: root/js/reveal.js
diff options
context:
space:
mode:
authorHakim El Hattab2013-10-13 11:47:04 -0400
committerHakim El Hattab2013-10-13 11:47:04 -0400
commite14f5a95da776980b0364b1fb3f01741b06329e7 (patch)
tree5cc18c57fcb92cefc400557e56c6eb4ca2efc1c1 /js/reveal.js
parent88d84e45513d1623542f2e5e083bdb1dfcfbe135 (diff)
prioritize closing preview when ESC is pressed
Diffstat (limited to 'js/reveal.js')
-rw-r--r--js/reveal.js7
1 files changed, 6 insertions, 1 deletions
diff --git a/js/reveal.js b/js/reveal.js
index 63de377..7d32638 100644
--- a/js/reveal.js
+++ b/js/reveal.js
@@ -2458,7 +2458,12 @@ var Reveal = (function(){
}
// ESC or O key
else if ( ( event.keyCode === 27 || event.keyCode === 79 ) && supports3DTransforms ) {
- toggleOverview();
+ if( dom.preview ) {
+ closePreview();
+ }
+ else {
+ toggleOverview();
+ }
event.preventDefault();
}