From 9ab2a7f6ea6650fcbbb20f9d0dd207de2d58b286 Mon Sep 17 00:00:00 2001 From: cash Date: Sun, 26 Jun 2011 09:21:09 -0400 Subject: updated based on Brett's comments and removed old stuff related to facebox lightbox --- mod/embed/views/default/js/embed/embed.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'mod/embed/views/default/js') diff --git a/mod/embed/views/default/js/embed/embed.php b/mod/embed/views/default/js/embed/embed.php index 39d400715..bf04c0963 100644 --- a/mod/embed/views/default/js/embed/embed.php +++ b/mod/embed/views/default/js/embed/embed.php @@ -8,8 +8,8 @@ elgg.embed.init = function() { // caches the current textarea id $(".embed-control").live('click', function() { var classes = $(this).attr('class'); - var class = classes.split(/[, ]+/).pop(); - var textAreaId = class.substr(class.indexOf('embed-control-') + "embed-control-".length); + var embedClass = classes.split(/[, ]+/).pop(); + var textAreaId = embedClass.substr(embedClass.indexOf('embed-control-') + "embed-control-".length); elgg.embed.textAreaId = textAreaId; }); @@ -76,8 +76,9 @@ elgg.embed.submit = function(event) { } }); - // this is bubbling up the DOM and causing a submission so return false - return false; + // this was bubbling up the DOM causing a submission + event.preventDefault(); + event.stopPropagation(); } /** -- cgit v1.2.3