From 2cd988a7a347ddad39b4315b2f63e7c1105ecd19 Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Thu, 4 Sep 2014 18:00:21 +0200 Subject: [PATCH] fix previewLinks target --- js/reveal.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/js/reveal.js b/js/reveal.js index 8110afc7..25f0dcf7 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -3778,10 +3778,12 @@ */ function onPreviewLinkClicked( event ) { - var url = event.target.getAttribute( 'href' ); - if( url ) { - showPreview( url ); - event.preventDefault(); + if( event.currentTarget && event.currentTarget.hasAttribute( 'href' ) ) { + var url = event.currentTarget.getAttribute( 'href' ); + if( url ) { + showPreview( url ); + event.preventDefault(); + } } }