]> khamidou — GitHub mirrors - popcorn-js.git/commitdiff
[#557] Fixed issue about an error being thrown when jquery dragable is being used
authorDavid Seifried <david.c.seifried@gmail.com>
Wed, 8 Jun 2011 14:37:17 +0000 (10:37 -0400)
committerDavid Seifried <david.c.seifried@gmail.com>
Wed, 8 Jun 2011 14:37:17 +0000 (10:37 -0400)
plugins/pause/popcorn.pause.js

index cb1cc116f56e6f7d010fb509fa52114b13133862..a0bb887649420b7793cab6915053c340a0bc7433 100644 (file)
@@ -1,4 +1,4 @@
-/**
+z/**
 * Pause Popcorn Plug-in
 *
 * When this plugin is used, links on the webpage, when clicked, will pause
 */
 
 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();