diff options
| author | Christophe Simonis <chs@odoo.com> | 2014-09-05 15:28:22 +0200 |
|---|---|---|
| committer | Christophe Simonis <chs@odoo.com> | 2014-09-05 15:28:22 +0200 |
| commit | 31bf30d2d0eb78baaa36360b99fe58bf7cd4c9e7 (patch) | |
| tree | d7be61ecd6bb4c8b5552e39b03e2a64eebbbf323 /addons/website/static/src/js/website.snippets.editor.js | |
| parent | afba9e8817c458640ae446ac7aaaab79be4fe1e9 (diff) | |
| parent | ed1c173971968eaa96693cb4e1547efa6e6c34e0 (diff) | |
[MERGE] forward port of branch 8.0 up to ed1c173
Diffstat (limited to 'addons/website/static/src/js/website.snippets.editor.js')
| -rw-r--r-- | addons/website/static/src/js/website.snippets.editor.js | 10 |
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); }, }); |
