diff --git a/addons/web_editor/static/src/scss/wysiwyg.scss b/addons/web_editor/static/src/scss/wysiwyg.scss index d76b7f4b648..0418bf35c7d 100644 --- a/addons/web_editor/static/src/scss/wysiwyg.scss +++ b/addons/web_editor/static/src/scss/wysiwyg.scss @@ -35,7 +35,6 @@ $o-we-zindex: $o-we-overlay-zindex + 1 !default; z-index: $o-we-zindex; height: var(--o-we-toolbar-height); background-color: $o-we-bg; - transition: transform 400ms ease 0s; // For fullscreen .note-popover .popover { top: 0 !important; diff --git a/addons/web_editor/static/src/scss/wysiwyg_snippets.scss b/addons/web_editor/static/src/scss/wysiwyg_snippets.scss index ad11b201fde..eb462326d6e 100644 --- a/addons/web_editor/static/src/scss/wysiwyg_snippets.scss +++ b/addons/web_editor/static/src/scss/wysiwyg_snippets.scss @@ -108,7 +108,7 @@ body.editor_enable.editor_has_snippets { font-weight: 700; line-height: 1; - transition: transform 400ms ease 0s; // Also for fullscreen + transition: transform 400ms ease 0s; transform: translateX(-100%); &.o_loaded { diff --git a/addons/website/static/src/js/content/website_root.js b/addons/website/static/src/js/content/website_root.js index fa2a01eecd2..91581d6293f 100644 --- a/addons/website/static/src/js/content/website_root.js +++ b/addons/website/static/src/js/content/website_root.js @@ -170,6 +170,7 @@ var WebsiteRoot = publicRootData.PublicRoot.extend(KeyboardNavigationMixin, { */ _toggleFullscreen(state) { this.isFullscreen = state; + document.body.classList.add('o_fullscreen_transition'); document.body.classList.toggle('o_fullscreen', this.isFullscreen); document.body.style.overflowX = 'hidden'; let resizing = true; @@ -189,6 +190,7 @@ var WebsiteRoot = publicRootData.PublicRoot.extend(KeyboardNavigationMixin, { resizing = false; document.body.style.overflowX = ''; document.body.removeEventListener('transitionend', onTransitionEnd); + document.body.classList.remove('o_fullscreen_transition'); }; document.body.addEventListener('transitionend', onTransitionEnd); // Safeguard in case the transitionend event doesn't trigger for whatever reason. diff --git a/addons/website/static/src/scss/website.ui.scss b/addons/website/static/src/scss/website.ui.scss index 882529d7ac6..10e80bde523 100644 --- a/addons/website/static/src/scss/website.ui.scss +++ b/addons/website/static/src/scss/website.ui.scss @@ -8,22 +8,26 @@ body { // Set frontend direction that will be flipped with // rtlcss for right-to-left text direction. direction: ltr; - transition: padding 400ms ease 0s; } body.o_connected_user { padding-top: $o-navbar-height!important; + &.o_fullscreen_transition { + transition: padding 400ms ease 0s; + + #oe_main_menu_navbar, #web_editor-top-edit, #oe_snippets { + transition: transform 400ms ease 0s !important; + } + } &.o_fullscreen { padding-top: 0 !important; &.editor_enable.editor_has_snippets { padding-left: 0 !important; } - #oe_main_menu_navbar, #web_editor-top-edit { transform: translateY(-100%); } - #oe_snippets { transform: translateX(-100%); } @@ -38,7 +42,6 @@ body.o_connected_user { z-index: $zindex-modal - 10; font-family: $o-we-font-family; font-size: 14px; - transition: transform 400ms ease 0s; // For fullscreen a:hover, a:focus { text-decoration: none;