From 5e85f02eb1596d0c5a71aa35430c0914e0b6d35a Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Sun, 4 May 2014 09:32:10 +0200 Subject: [PATCH] ensure default can be prevented --- js/reveal.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/reveal.js b/js/reveal.js index ad332a32..11d6cda3 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -3278,7 +3278,7 @@ // If the input resulted in a triggered action we should prevent // the browsers default behavior if( triggered ) { - event.preventDefault(); + event.preventDefault && event.preventDefault(); } // ESC or O key else if ( ( event.keyCode === 27 || event.keyCode === 79 ) && features.transforms3d ) { @@ -3289,7 +3289,7 @@ toggleOverview(); } - event.preventDefault(); + event.preventDefault && event.preventDefault(); } // If auto-sliding is enabled we need to cue up