summaryrefslogtreecommitdiff
path: root/addons/website/static/src/js/website.snippets.editor.js
diff options
context:
space:
mode:
Diffstat (limited to 'addons/website/static/src/js/website.snippets.editor.js')
-rw-r--r--addons/website/static/src/js/website.snippets.editor.js10
1 files changed, 7 insertions, 3 deletions
diff --git a/addons/website/static/src/js/website.snippets.editor.js b/addons/website/static/src/js/website.snippets.editor.js
index e734d361da9..116f55713ec 100644
--- a/addons/website/static/src/js/website.snippets.editor.js
+++ b/addons/website/static/src/js/website.snippets.editor.js
@@ -247,13 +247,14 @@
var self = this;
var snipped_event_flag;
self.$wrapwrap.on('click', function (event) {
- if (snipped_event_flag || !event.srcElement) {
+ var srcElement = event.srcElement || (event.originalEvent && (event.originalEvent.originalTarget || event.originalEvent.target));
+ if (snipped_event_flag || !srcElement) {
return;
}
snipped_event_flag = true;
setTimeout(function () {snipped_event_flag = false;}, 0);
- var $target = $(event.srcElement);
+ var $target = $(srcElement);
if ($target.parents(".oe_overlay").length) {
return;
@@ -644,7 +645,7 @@
var styles = this.$target.data("snippet-option-ids") || {};
styles[option_id] = this;
this.$target.data("snippet-option-ids", styles);
- this.$overlay = this.$target.data('overlay');
+ this.$overlay = this.$target.data('overlay') || $('<div>');
this.option= option_id;
this.$el = option.$el.find(">li").clone();
this.data = option.$el.data();
@@ -1505,6 +1506,9 @@
new website.editor.MediaDialog(self, self.element).appendTo(document.body);
self.BuildingBlock.make_active(false);
}
+ setTimeout(function () {
+ self.$target.find(".css_editable_mode_display").removeAttr("_moz_abspos");
+ },0);
},
});