← back to Corkwallcovering
search: scroll results into view on mobile (grid was below the fold under the keyboard → looked like nothing happened)
ef03ded92872d3fe5703805764d6ca0df683d905 · 2026-07-30 08:50:12 -0700 · Steve Abrams
Files touched
Diff
commit ef03ded92872d3fe5703805764d6ca0df683d905
Author: Steve Abrams <steve@designerwallcoverings.com>
Date: Thu Jul 30 08:50:12 2026 -0700
search: scroll results into view on mobile (grid was below the fold under the keyboard → looked like nothing happened)
---
public/index.html | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/public/index.html b/public/index.html
index 03df3ab..be9aa1f 100644
--- a/public/index.html
+++ b/public/index.html
@@ -839,7 +839,15 @@ io.observe(document.getElementById('sentinel'));
document.getElementById('searchInput').addEventListener('input', e => {
state.q = e.target.value.trim();
clearTimeout(window._t);
- window._t = setTimeout(resetGrid, 220);
+ window._t = setTimeout(() => {
+ resetGrid();
+ // On mobile the results grid sits below the fold (under the keyboard), so a search
+ // looks like "nothing happened" even though it filtered. Bring results into view.
+ if (state.q) {
+ const anchor = document.getElementById('statLine') || document.getElementById('grid');
+ if (anchor) anchor.scrollIntoView({ behavior: 'smooth', block: 'start' });
+ }
+ }, 220);
});
// Density slider
← 60c7ca2 corner-nav: block javascript:/data: URIs in search preview (
·
back to Corkwallcovering
·
hero: real cork room-setting image + remove 'Living Texture' 2ae19ab →