From 004283bf6109221111742e1e12d22bc356822cba Mon Sep 17 00:00:00 2001 From: Dariusz Szut Date: Wed, 12 Feb 2020 11:27:07 +0100 Subject: [PATCH] Revert "EZEE-2975: In Page Builder dropdown widgets are too low after being expanded (#1229)" This reverts commit 68675ddd1aa3d3bafded9531942ed0e2321c5e15. --- .../js/scripts/sidebar/extra.actions.js | 20 +------------------ .../Resources/public/scss/_extra-actions.scss | 4 ++-- 2 files changed, 3 insertions(+), 21 deletions(-) diff --git a/src/bundle/Resources/public/js/scripts/sidebar/extra.actions.js b/src/bundle/Resources/public/js/scripts/sidebar/extra.actions.js index d7bda257e0..dab126f927 100644 --- a/src/bundle/Resources/public/js/scripts/sidebar/extra.actions.js +++ b/src/bundle/Resources/public/js/scripts/sidebar/extra.actions.js @@ -26,25 +26,7 @@ } }; - if (actions.classList.contains('ez-extra-actions--dropdown')) { - const actionsRect = actions.getBoundingClientRect(); - const fitsViewport = actionsRect.height + btn.offsetTop <= global.innerHeight; - - actions.style.opacity = 0; - - if (!fitsViewport) { - actions.style.bottom = `0px`; - actions.style.top = 'auto'; - } else { - actions.style.top = `${btn.offsetTop}px`; - actions.style.bottom = 'auto'; - } - - actions.style.opacity = 1; - } else { - btn.classList[methodNameButton](CLASS_ACTIVE_BUTTON); - } - + btn.classList[methodNameButton](CLASS_ACTIVE_BUTTON); actions.classList[methodNameContainer](CLASS_HIDDEN); if (!actions.classList.contains(CLASS_HIDDEN)) { diff --git a/src/bundle/Resources/public/scss/_extra-actions.scss b/src/bundle/Resources/public/scss/_extra-actions.scss index 87d82848dc..bf8830faa4 100644 --- a/src/bundle/Resources/public/scss/_extra-actions.scss +++ b/src/bundle/Resources/public/scss/_extra-actions.scss @@ -174,12 +174,12 @@ opacity: 1; transform: translate(calc(-100%), 0) scaleX(1); transform-origin: right center; - transition: transform 0.4s ease-in, opacity 0.4s ease-in; + transition: all 0.4s ease-in; &--hidden { opacity: 0; transform: translate(calc(-100%), 0) scaleX(0); - transition: transform 0.2s ease-out, opacity 0.2s ease-out; + transition: all 0.2s ease-out; } } }