Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Revert "EZEE-2975: In Page Builder dropdown widgets are too low after being expanded" #1234

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 1 addition & 19 deletions src/bundle/Resources/public/js/scripts/sidebar/extra.actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down
4 changes: 2 additions & 2 deletions src/bundle/Resources/public/scss/_extra-actions.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
}