8000 There is a gap at the bottom of the Megamenu in both portrait and landscape mode on the FF browser by patel-prince · Pull Request #4341 · adobecom/milo · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

There is a gap at the bottom of the Megamenu in both portrait and landscape mode on the FF browser #4341

New issue

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

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

Already on GitHub? Sign in to your account

Merged
merged 18 commits into from
Jul 5, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
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
3 changes: 2 additions & 1 deletion libs/blocks/global-navigation/global-navigation.css
Original file line number Diff line number Diff line change
Expand Up @@ -916,7 +916,7 @@ header.new-nav .feds-nav > section.feds-navItem > .feds-popup {
top: calc(-1 * var(--feds-height-nav));
visibility: hidden;
width: 100%;
height: calc(var(--feds-height-nav) + 100%);
height: calc(var(--feds-height-nav) + 100% + 2px);
background-color: var(--feds-background-nav);
transition: translate 0.4s ease-out, opacity 0.2s ease, visibility 0s linear 0.5s;
translate: 300vw 0;
Expand Down Expand Up @@ -1065,6 +1065,7 @@ header.new-nav .feds-nav > section.feds-navItem > .feds-popup .tabs button[aria-
}

header.new-nav .feds-nav > section.feds-navItem > .feds-popup .tab-content {
min-height: 0;
background-color: var(--feds-backgroundColor-tabContent-v2);
padding: 10px 13px 25px;
display: flex;
Expand Down
40 changes: 24 additions & 16 deletions libs/blocks/global-navigation/utilities/utilities.js
Original file line number Diff line number Diff line change
Expand Up @@ -657,6 +657,9 @@ export const transformTemplateToMobile = async ({ popup, item, localnav = false,
});

tabbuttons.forEach((tab, i) => {
// pinterdown prevents the default action of the button, which is to scroll the window.
// This is needed to prevent the page from jumping when the tab is clicked.
tab.addEventListener('pointerdown', (event) => event.preventDefault());
tab.addEventListener('click', tabbuttonClickCallbacks[i]);
});

Expand Down Expand Up @@ -810,23 +813,28 @@ export const [branchBannerLoadCheck, getBranchBannerInfo] = (() => {
if (mutation.type === 'childList') {
mutation.addedNodes.forEach((node) => {
// Check if the added node has the ID 'branch-banner-iframe'
if (node.id === 'branch-banner-iframe') {
branchBannerInfo.isPresent = true;
// The element is added, now check its height and sticky status
// Check if the element has a sticky position
branchBannerInfo.isSticky = window.getComputedStyle(node).position === 'fixed';
branchBannerInfo.height = node.offsetHeight; // Get the height of the element
if (branchBannerInfo.isSticky) {
// Adjust the top position of the lnav to account for the branch banner height
const navElem = document.querySelector(isLocalNav() ? '.feds-localnav' : 'header');
navElem.style.top = `${branchBannerInfo.height}px`;
} else {
// Add a class to the body to indicate the presence of a non-sticky branch banner
document.body.classList.add('branch-banner-inline');
setTimeout(() => {
if (node.id === 'branch-banner-iframe') {
branchBannerInfo.isPresent = true;
// The element is added, now check its height and sticky status
// Check if the element has a sticky position
branchBannerInfo.isSticky = window.getComputedStyle(node).position === 'fixed';
branchBannerInfo.height = node.offsetHeight; // Get the height of the element
if (branchBannerInfo.isSticky) {
// Adjust the top position of the lnav to account for the branch banner height
const navElem = document.querySelector(isLocalNav() ? '.feds-localnav' : 'header');
navElem.style.top = `${branchBannerInfo.height}px`;
} else {
/* Add a class to the body to indicate the presence of a non-sticky
branch banner */
document.body.classList.add('branch-banner-inline');
}
// Update the popup position when the branch banner is added
updatePopupPosition();
}
// Update the popup position when the branch banner is added
updatePopupPosition();
}
}, 50);
/* 50ms delay to ensure the node is fully rendered with styles before
checking its properties */
});

mutation.removedNodes.forEach((node) => {
Expand Down
Loading
0