From 130c3d3e4714da6c524fddf81faf519e516175a5 Mon Sep 17 00:00:00 2001 From: David Seifried Date: Wed, 8 Jun 2011 10:37:17 -0400 Subject: [PATCH] [#557] Fixed issue about an error being thrown when jquery dragable is being used --- plugins/pause/popcorn.pause.js | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/plugins/pause/popcorn.pause.js b/plugins/pause/popcorn.pause.js index cb1cc11..a0bb887 100644 --- a/plugins/pause/popcorn.pause.js +++ b/plugins/pause/popcorn.pause.js @@ -1,4 +1,4 @@ -/** +z/** * Pause Popcorn Plug-in * * When this plugin is used, links on the webpage, when clicked, will pause @@ -15,14 +15,11 @@ */ document.addEventListener( "click", function( event ) { - //Consider I.E. + var targetElement = event.target; - if ( window.event ) { - targetElement = window.event.srcElement; - } //Some browsers use an element as the target, some use the text node inside - if ( targetElement.tagName === "A" || targetElement.parentNode.tagName === "A" ) { + if ( targetElement.tagName === "A" || targetElement.parentNode && targetElement.parentNode.tagName === "A" ) { Popcorn.instances.forEach( function( video ) { if ( video.options.pauseOnLinkClicked ) { video.pause(); -- 2.43.0