Compare commits

...

2 Commits

Author SHA1 Message Date
Ponte
4608eefe2f Release: promote preprod to prod (fix edit scroll jump) 2026-03-05 19:27:21 +01:00
Ponte
e98d8c5717 Fix: prevent scroll jump while editing game fields 2026-03-05 19:25:48 +01:00

21
app.js
View File

@@ -100,6 +100,7 @@ let scannerRunning = false;
let scannerLoopId = null;
let scannerLastCodeValue = "";
let scannerLastCodeAt = 0;
let resizeRenderTimeout = null;
let selectedGameIds = new Set();
let currentPage = 1;
let currentPageGameIds = [];
@@ -290,7 +291,27 @@ if (nextPageBtn) {
}
window.addEventListener("resize", () => {
// Mobile virtual keyboards trigger resize events. Avoid rerendering while editing,
// otherwise the list rebuild can jump to top and break inline input edits.
if (inlineEditingGameId || editingGameId) {
return;
}
const active = document.activeElement;
if (
active instanceof HTMLInputElement ||
active instanceof HTMLTextAreaElement ||
active instanceof HTMLSelectElement
) {
return;
}
if (resizeRenderTimeout) {
clearTimeout(resizeRenderTimeout);
}
resizeRenderTimeout = window.setTimeout(() => {
renderGames();
}, 120);
});
if (v2SearchInput) {