fix: scroll jumps while typing — overflow-anchor:none on live search lists (Chrome scroll anchoring)
This commit is contained in:
@@ -355,6 +355,10 @@ a.btn { display: inline-flex; align-items: center; gap: 6px; text-decoration: no
|
||||
max-height: min(60vh, 480px); overflow: auto; /* long lists scroll on mobile */
|
||||
}
|
||||
.suggest:empty { display: none; }
|
||||
/* Live-updating lists must never become the browser's scroll anchor —
|
||||
Chrome otherwise "compensates" each keystroke's DOM swap with a scroll
|
||||
adjustment (the page visibly jumps while typing). */
|
||||
.suggest, .search-results, #search-status { overflow-anchor: none; }
|
||||
.suggest li { display: flex; align-items: flex-start; gap: var(--space-s); padding: 0 12px; border-radius: calc(var(--radius) - 8px); }
|
||||
.suggest li + li { margin-top: 2px; } /* rows breathe — hover fills read as discrete items */
|
||||
.suggest li:hover, .suggest li:focus-within { background: var(--moon); }
|
||||
|
||||
Reference in New Issue
Block a user