aboutsummaryrefslogtreecommitdiff
path: root/mod/embed/views/default/js/embed/embed.php
diff options
context:
space:
mode:
Diffstat (limited to 'mod/embed/views/default/js/embed/embed.php')
-rw-r--r--mod/embed/views/default/js/embed/embed.php9
1 files changed, 5 insertions, 4 deletions
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();
}
/**