← back to Wallco Ai
needs-tif: marquee can start from grid margins (listener on main) + clear stuck didDrag after empty-space drag so next click isn't swallowed — found via E2E
c8866fd4c1c113edc1bdfd77e4304feeb54c620e · 2026-06-02 10:01:06 -0700 · Steve Abrams
Files touched
M public/admin/needs-tif.html
Diff
commit c8866fd4c1c113edc1bdfd77e4304feeb54c620e
Author: Steve Abrams <steve@designerwallcoverings.com>
Date: Tue Jun 2 10:01:06 2026 -0700
needs-tif: marquee can start from grid margins (listener on main) + clear stuck didDrag after empty-space drag so next click isn't swallowed — found via E2E
---
public/admin/needs-tif.html | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/public/admin/needs-tif.html b/public/admin/needs-tif.html
index fb28362..84a9787 100644
--- a/public/admin/needs-tif.html
+++ b/public/admin/needs-tif.html
@@ -231,9 +231,11 @@
// ---- marquee (rubber-band) ----------------------------------------------
var dragging = false, sx = 0, sy = 0, baseline = null, rafPending = false, lastE = null;
- grid.addEventListener('mousedown', function (e) {
+ var mainEl = document.querySelector('main');
+ mainEl.addEventListener('mousedown', function (e) {
if (e.button !== 0) return;
if (e.target.closest('.pick')) return; // pick-box handles itself
+ if (e.target.closest('#selbar')) return; // don't lasso when clicking the selection bar
sx = e.clientX; sy = e.clientY; dragging = true; didDrag = false;
baseline = (e.shiftKey || e.metaKey || e.ctrlKey) ? new Set(selected) : new Set();
});
@@ -248,6 +250,10 @@
if (!dragging) return;
dragging = false; marquee.style.display = 'none';
syncSelBar();
+ // The synthetic post-drag click fires synchronously next and is suppressed by the
+ // capture handler; clear the flag a tick later so a stuck didDrag (drag ended on
+ // empty space, no card-click to reset it) can't swallow the user's next real click.
+ setTimeout(function () { didDrag = false; }, 0);
});
function applyMarquee() {
rafPending = false;
← d04f0a2 deploy: exclude data/fix-decisions.jsonl (prod-authored scan
·
back to Wallco Ai
·
test: add E2E for /admin/needs-tif (marquee select + 8 sorts 693981b →