diff options
author | Hakim El Hattab | 2013-10-13 11:47:04 -0400 |
---|---|---|
committer | Hakim El Hattab | 2013-10-13 11:47:04 -0400 |
commit | e14f5a95da776980b0364b1fb3f01741b06329e7 (patch) | |
tree | 5cc18c57fcb92cefc400557e56c6eb4ca2efc1c1 /js/reveal.js | |
parent | 88d84e45513d1623542f2e5e083bdb1dfcfbe135 (diff) |
prioritize closing preview when ESC is pressed
Diffstat (limited to 'js/reveal.js')
-rw-r--r-- | js/reveal.js | 7 |
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(); } |