From 4ed043a0ff6bbb72e6ef5142bb64562d7f2bfdbf Mon Sep 17 00:00:00 2001 From: you Date: Thu, 19 Mar 2026 21:01:01 +0000 Subject: [PATCH] fix: explicitly set left panel + table width during drag for live column reflow --- public/packets.js | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/public/packets.js b/public/packets.js index 0cb1bf4..fd6cf09 100644 --- a/public/packets.js +++ b/public/packets.js @@ -38,15 +38,25 @@ const w = Math.max(280, Math.min(window.innerWidth * 0.7, startW - (e2.clientX - startX))); panel.style.width = w + 'px'; panel.style.minWidth = w + 'px'; - // Force table to reflow with new available width + // Force left panel and table to match new available width const left = document.getElementById('pktLeft'); - if (left) { left.style.overflow = 'hidden'; void left.offsetWidth; left.style.overflow = ''; } + const table = document.getElementById('pktTable'); + if (left && table) { + const available = left.parentElement.clientWidth - w; + left.style.width = available + 'px'; + table.style.width = available + 'px'; + } } function onUp() { handle.classList.remove('dragging'); document.body.style.cursor = ''; document.body.style.userSelect = ''; localStorage.setItem(PANEL_WIDTH_KEY, panel.offsetWidth); + // Clear forced widths, let flex take over + const left = document.getElementById('pktLeft'); + const table = document.getElementById('pktTable'); + if (left) left.style.width = ''; + if (table) table.style.width = ''; document.removeEventListener('mousemove', onMove); document.removeEventListener('mouseup', onUp); }