summaryrefslogtreecommitdiff
path: root/addons/web_editor/static/src/js/backend/fields.js
diff options
context:
space:
mode:
Diffstat (limited to 'addons/web_editor/static/src/js/backend/fields.js')
-rw-r--r--addons/web_editor/static/src/js/backend/fields.js12
1 files changed, 12 insertions, 0 deletions
diff --git a/addons/web_editor/static/src/js/backend/fields.js b/addons/web_editor/static/src/js/backend/fields.js
index cbdb6cbb88b..b84fcd21c91 100644
--- a/addons/web_editor/static/src/js/backend/fields.js
+++ b/addons/web_editor/static/src/js/backend/fields.js
@@ -409,7 +409,19 @@ var FieldTextHtml = AbstractField.extend({
var layoutInfo = self.editor.rte.editable().data('layoutInfo');
$.summernote.pluginEvents.codeview(undefined, undefined, layoutInfo, false);
}
+ var $ancestors = self.$iframe.filter(':not(:visible)').parentsUntil(':visible').addBack();
+ var ancestorsStyle = [];
+ // temporarily force displaying iframe (needed for firefox)
+ _.each($ancestors, function (el) {
+ var $el = $(el);
+ ancestorsStyle.unshift($el.attr('style') || null);
+ $el.css({display: 'initial', visibility: 'hidden', height: 1});
+ });
self.editor.snippetsMenu && self.editor.snippetsMenu.cleanForSave();
+ _.each($ancestors, function (el) {
+ var $el = $(el);
+ $el.attr('style', ancestorsStyle.pop());
+ });
self._setValue(self.$content.html());
});
},