diff options
| author | Christophe Simonis <chs@odoo.com> | 2018-02-01 18:20:28 +0100 |
|---|---|---|
| committer | Christophe Simonis <chs@odoo.com> | 2018-02-01 18:20:28 +0100 |
| commit | e00a447e2ca277697bd3e3cae5196e8177d3e867 (patch) | |
| tree | c8580e47f101f75ceccd6ba19f9649b575f99177 /addons/web_editor/static/src/js/backend | |
| parent | cde120058aa4edd259b7d7e1624465af313710fe (diff) | |
| parent | 7e469eb77aae1f7e05a3ce0f6575b5149fed3ca1 (diff) | |
[MERGE] forward port branch saas-11.1 up to 7e469eb77aa
Diffstat (limited to 'addons/web_editor/static/src/js/backend')
| -rw-r--r-- | addons/web_editor/static/src/js/backend/fields.js | 12 |
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()); }); }, |
