diff options
| author | Christophe Simonis <chs@odoo.com> | 2018-02-01 18:15:21 +0100 |
|---|---|---|
| committer | Christophe Simonis <chs@odoo.com> | 2018-02-01 18:15:21 +0100 |
| commit | 7e469eb77aae1f7e05a3ce0f6575b5149fed3ca1 (patch) | |
| tree | 25023238fd6ccde1f3b8e805b03fcf228798a7b0 /addons/web_editor/static/src/js/backend | |
| parent | c4895c2f2ba0fcd8fc5aef210003c20ba2154979 (diff) | |
| parent | f5e7b866860436782ade53308da1ff725be1f124 (diff) | |
[MERGE] forward port branch 11.0 up to f5e7b866860
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()); }); }, |
