Fix mobile menu positioning on iOS — use fixed + getBoundingClientRect
Some checks are pending
NordaBiz Tests / Unit & Integration Tests (push) Waiting to run
NordaBiz Tests / E2E Tests (Playwright) (push) Blocked by required conditions
NordaBiz Tests / Smoke Tests (Production) (push) Blocked by required conditions
NordaBiz Tests / Send Failure Notification (push) Blocked by required conditions
Some checks are pending
NordaBiz Tests / Unit & Integration Tests (push) Waiting to run
NordaBiz Tests / E2E Tests (Playwright) (push) Blocked by required conditions
NordaBiz Tests / Smoke Tests (Production) (push) Blocked by required conditions
NordaBiz Tests / Send Failure Notification (push) Blocked by required conditions
Replace position:absolute (unreliable inside sticky header on iOS Safari) with position:fixed + dynamic top calculated from header bottom edge. Add -webkit-overflow-scrolling:touch for smooth scrolling on iOS. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
795882a456
commit
c1523b840e
@ -583,15 +583,18 @@
|
||||
|
||||
.nav-menu {
|
||||
display: none;
|
||||
position: absolute;
|
||||
top: 100%;
|
||||
position: fixed;
|
||||
left: 0;
|
||||
right: 0;
|
||||
background-color: var(--surface);
|
||||
flex-direction: column;
|
||||
padding: var(--spacing-md);
|
||||
border-top: 1px solid var(--border);
|
||||
box-shadow: var(--shadow-md);
|
||||
box-shadow: 0 4px 20px rgba(0,0,0,0.15);
|
||||
z-index: 99;
|
||||
max-height: 70vh;
|
||||
overflow-y: auto;
|
||||
-webkit-overflow-scrolling: touch;
|
||||
}
|
||||
|
||||
.nav-menu.active {
|
||||
@ -2034,7 +2037,16 @@
|
||||
|
||||
// Mobile menu toggle
|
||||
function toggleMobileMenu() {
|
||||
document.getElementById('navMenu').classList.toggle('active');
|
||||
const menu = document.getElementById('navMenu');
|
||||
const isOpen = menu.classList.contains('active');
|
||||
if (!isOpen) {
|
||||
// Position menu just below the header using getBoundingClientRect
|
||||
const header = document.querySelector('header');
|
||||
if (header) {
|
||||
menu.style.top = header.getBoundingClientRect().bottom + 'px';
|
||||
}
|
||||
}
|
||||
menu.classList.toggle('active');
|
||||
}
|
||||
|
||||
// Auto-dismiss flash messages after 5 seconds
|
||||
|
||||
Loading…
Reference in New Issue
Block a user