diff --git a/debian/build-deb.sh b/debian/build-deb.sh index 56ea70e..aeed470 100644 --- a/debian/build-deb.sh +++ b/debian/build-deb.sh @@ -13,7 +13,7 @@ BUILD_DIR="$REPO_ROOT/build/deb" # ── Config ──────────────────────────────────────────────────────────────────── PKG_NAME="dupfinder" -PKG_VERSION="1.0.9" +PKG_VERSION="1.0.10" PKG_ARCH="amd64" DEB_FILE="${PKG_NAME}_${PKG_VERSION}_${PKG_ARCH}.deb" diff --git a/templates/index.html b/templates/index.html index 55aedb8..11e7c05 100644 --- a/templates/index.html +++ b/templates/index.html @@ -1288,19 +1288,13 @@ async function openGroup(groupId, cellEl) { state.activeGroupData = g; renderDetail(g); - // Insert detail panel after the row containing the clicked cell + // Position detail panel directly after the grid (in the grid's parent). + // Earlier we tried to thread it between grid rows but mixed parent + // contexts and threw "node is not a child of this node". const panel = el('detail-panel'); const grid = el('gallery-grid'); - if (cellEl) { - // find row end - const cellRect = cellEl.getBoundingClientRect(); - const gridRect = grid.getBoundingClientRect(); - const cells = Array.from(grid.children).filter(c => c.classList.contains('gallery-cell')); - const cols = Math.round(grid.offsetWidth / (cellEl.offsetWidth + 12)); - const cellIdx = cells.indexOf(cellEl); - const rowEnd = Math.min(Math.ceil((cellIdx + 1) / cols) * cols, cells.length); - const afterCell = cells[rowEnd - 1]; - grid.parentNode.insertBefore(panel, afterCell.nextSibling || el('load-more-wrap')); + if (panel.parentNode !== grid.parentNode || panel.previousSibling !== grid) { + grid.parentNode.insertBefore(panel, grid.nextSibling); } panel.classList.add('show'); panel.scrollIntoView({ behavior: 'smooth', block: 'nearest' });