fix: header search overlay clipping and mobile fit
- Change overlay from position:absolute to position:fixed so it isn't clipped by main-content's overflow-y:auto - Set overlay top dynamically from header.offsetHeight so it always anchors exactly below the sticky header - Responsive max-height: accounts for player bar + bottom nav on mobile - Hide logo text on ≤359px screens to keep search pill wide enough Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
1 parent
36f968881b
commit
c8ccb80f2f
3 files changed
+11
-2
No files matched your search
+1
-1
@@ -123,7 +123,7 @@
|
|||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div id="header-search-overlay" style="display:none;position:absolute;left:0;right:0;top:100%;max-height:calc(100vh - 100px);overflow-y:auto;background:var(--bg);border-bottom:1px solid var(--border);box-shadow:0 12px 32px rgba(0,0,0,.5);padding:6px 12px 20px;z-index:9">
|
<div id="header-search-overlay" style="display:none">
|
||||||
<div id="header-search-results"></div>
|
<div id="header-search-results"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
+6
-1
@@ -1017,7 +1017,12 @@ export function onHeaderSearch(val) {
|
|||||||
if (clearBtn) clearBtn.style.display = val ? 'block' : 'none';
|
if (clearBtn) clearBtn.style.display = val ? 'block' : 'none';
|
||||||
clearTimeout(S._headerSearchTimer);
|
clearTimeout(S._headerSearchTimer);
|
||||||
if (!val.trim()) { if (overlay) overlay.style.display = 'none'; return; }
|
if (!val.trim()) { if (overlay) overlay.style.display = 'none'; return; }
|
||||||
if (overlay) overlay.style.display = 'block';
|
if (overlay) {
|
||||||
|
// position:fixed — anchor top to actual header bottom so it works with any header height
|
||||||
|
const header = document.getElementById('mobile-header');
|
||||||
|
if (header) overlay.style.top = header.offsetHeight + 'px';
|
||||||
|
overlay.style.display = 'block';
|
||||||
|
}
|
||||||
const el = document.getElementById('header-search-results');
|
const el = document.getElementById('header-search-results');
|
||||||
S._headerSearchTimer = setTimeout(() => doLocalSearch(val, el), 300);
|
S._headerSearchTimer = setTimeout(() => doLocalSearch(val, el), 300);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -69,6 +69,10 @@ html.ns-authed #setup-screen{display:none}
|
|||||||
.header-search-wrap input{flex:1;min-width:0;background:none;border:none;outline:none;color:var(--text);font-family:var(--font);font-size:14px}
|
.header-search-wrap input{flex:1;min-width:0;background:none;border:none;outline:none;color:var(--text);font-family:var(--font);font-size:14px}
|
||||||
.header-search-wrap input::placeholder{color:var(--text3)}
|
.header-search-wrap input::placeholder{color:var(--text3)}
|
||||||
|
|
||||||
|
#header-search-overlay{position:fixed;left:0;right:0;background:var(--bg);border-bottom:1px solid var(--border);box-shadow:0 12px 32px rgba(0,0,0,.5);padding:6px 12px 20px;z-index:11;overflow-y:auto;max-height:calc(100vh - 120px)}
|
||||||
|
@media(max-width:768px){#header-search-overlay{max-height:calc(100vh - var(--player-h) - 160px)}}
|
||||||
|
@media(max-width:359px){#mobile-header .sidebar-logo span{display:none}}
|
||||||
|
|
||||||
nav{flex:1;overflow-y:auto;padding:4px 10px}
|
nav{flex:1;overflow-y:auto;padding:4px 10px}
|
||||||
.nav-section{margin-bottom:18px}
|
.nav-section{margin-bottom:18px}
|
||||||
.nav-section-title{font-size:10px;font-weight:600;letter-spacing:1px;text-transform:uppercase;color:var(--text3);padding:0 8px;margin-bottom:3px}
|
.nav-section-title{font-size:10px;font-weight:600;letter-spacing:1px;text-transform:uppercase;color:var(--text3);padding:0 8px;margin-bottom:3px}
|
||||||
|
|||||||
Reference in new issue
Block a user