[object Object]

← back to Wallco Ai

PDP customizer: hide dragged module from hit-test so reorder targets short panes reliably

9cf320650b6f0ccbb9579f0e100fcd28f4d42257 · 2026-06-02 09:26:28 -0700 · Steve

Files touched

Diff

commit 9cf320650b6f0ccbb9579f0e100fcd28f4d42257
Author: Steve <steve@designerwallcoverings.com>
Date:   Tue Jun 2 09:26:28 2026 -0700

    PDP customizer: hide dragged module from hit-test so reorder targets short panes reliably
---
 public/theme-variants/theme-section-rearrange.js | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/public/theme-variants/theme-section-rearrange.js b/public/theme-variants/theme-section-rearrange.js
index 18d3b5a..baf27fb 100644
--- a/public/theme-variants/theme-section-rearrange.js
+++ b/public/theme-variants/theme-section-rearrange.js
@@ -221,7 +221,13 @@
   }
   function clearHint() { if (hintEl) { hintEl.remove(); hintEl = null; } }
   function moduleUnder(x, y, exclude) {
+    // The dragged module follows the pointer (transform) and sits ON TOP of the
+    // drop target — so hide it from hit-testing, else elementsFromPoint returns
+    // the dragged element / its background and misses a short target beneath it.
+    var prevPE = exclude && exclude.style.pointerEvents;
+    if (exclude) exclude.style.pointerEvents = 'none';
     var els = document.elementsFromPoint(x, y);
+    if (exclude) exclude.style.pointerEvents = prevPE || '';
     for (var i = 0; i < els.length; i++) {
       var el = els[i];
       if (el === exclude || el.classList.contains('tsr-handle')) continue;

← 546e9b4 draft_corey_letter.py: env-first George auth (GMAIL_BASIC_AU  ·  back to Wallco Ai  ·  security-monitor: line-level edit classifier — stop paging C 27dad01 →