⚡ Quick Fix (TL;DR)
The Fix: 1. Check whether `max-height` uses `100vh` — replace with `dvh`.
2. Check whether any `scroll` event listener closes or hides the widget.
3. Check whether the popup has `position: fixed` — if not, it may reposition unexpectedly when the viewport shifts.
Two fixes applied together:
**Fix 1 — Replace `vh` with `dvh`:**
```css
@media (max-width: 600px) {
.widget-popup {
max-height: 70dvh;
position: fixed;
}
}
```
**Fix 2 — Guard the scroll listener:**
```javascript
window.addEventListener('scroll', function() {
if (popup.classList.contains('open')) return; // ignore scroll while widget is open
// hide launcher logic...
});
```
Was this helpful? Thanks for the feedback!
The symptom
Tagged in :
More from the field
Bisect to an Empty Baseline Before Trusting Any Single Theory
.
Multiple plausible-sounding theories for a bug each turned out to be wrong when actually tested – time was spent building fixes…
A Security Dashboard’s Activity Log Can Lag a Full Day Behind Real Time
.
Trying to check a security tool’s activity log for an event that had just happened showed nothing at all.