diff --git a/addons/web_editor/static/src/js/wysiwyg/wysiwyg_iframe.js b/addons/web_editor/static/src/js/wysiwyg/wysiwyg_iframe.js index 0d75f360731ce7bf5628a94791655063c9959ecc..25e1e734e1410568abe6776ed3295e90c82190f2 100644 --- a/addons/web_editor/static/src/js/wysiwyg/wysiwyg_iframe.js +++ b/addons/web_editor/static/src/js/wysiwyg/wysiwyg_iframe.js @@ -68,6 +68,8 @@ Wysiwyg.include({ } $(document.body).off('.' + this.id); + this.$iframe.parents().removeClass('o_wysiwyg_no_transform'); + this.$target.insertBefore(this.$iframe); delete window.top[this._onUpdateIframeId]; @@ -100,6 +102,10 @@ Wysiwyg.include({ } self.$iframe.toggleClass('o_fullscreen'); self.$iframe.contents().find('body').toggleClass('o_fullscreen'); + + // Hack to avoid a parent of the fullscreen iframe to have a + // transform (otherwise the position: fixed won't work) + self.$iframe.parents().toggleClass('o_wysiwyg_no_transform'); }, isFullscreen: function () { if (!self.$iframe) { diff --git a/addons/web_editor/static/src/scss/wysiwyg_iframe.scss b/addons/web_editor/static/src/scss/wysiwyg_iframe.scss index d019fdce7530dd99f97a043cc1f883bbbf499b17..1124d90335335cdf67ef22be50a71e32c1c8186b 100644 --- a/addons/web_editor/static/src/scss/wysiwyg_iframe.scss +++ b/addons/web_editor/static/src/scss/wysiwyg_iframe.scss @@ -10,6 +10,10 @@ iframe.wysiwyg_iframe.o_fullscreen { border: 0; } +.o_wysiwyg_no_transform { + transform: none !important; +} + body.o_in_iframe { background-color: $o-view-background-color; overflow: hidden;