From: David Seifried Date: Wed, 8 Jun 2011 14:37:17 +0000 (-0400) Subject: [#557] Fixed issue about an error being thrown when jquery dragable is being used X-Git-Tag: v0.7^2~51^2~2 X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=130c3d3e4714da6c524fddf81faf519e516175a5;p=popcorn-js.git [#557] Fixed issue about an error being thrown when jquery dragable is being used --- 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();