From 21058eb63c51baea3ab8025be3857fa2bf65c80b Mon Sep 17 00:00:00 2001 From: MHSanaei Date: Thu, 14 May 2026 02:04:05 +0200 Subject: [PATCH] fix(routing): make rule drag-and-drop work on mobile cards The pointermove handler looked up the drop target via el.closest('tr[data-row-key]'). That selector only matches the desktop a-table rows; the mobile branch renders each rule as a
, so on phones the lookup always returned null, dropTargetIndex stayed pinned to the start index, and the eventual drop was a no-op. Loosened the selector to [data-row-key] so both DOM shapes resolve. --- frontend/src/pages/xray/RoutingTab.vue | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/frontend/src/pages/xray/RoutingTab.vue b/frontend/src/pages/xray/RoutingTab.vue index c5a64649..36f01f5a 100644 --- a/frontend/src/pages/xray/RoutingTab.vue +++ b/frontend/src/pages/xray/RoutingTab.vue @@ -188,9 +188,9 @@ function onDragPointerMove(ev) { dragMoved = true; const el = document.elementFromPoint(ev.clientX, ev.clientY); if (!el) return; - const tr = el.closest('tr[data-row-key]'); - if (!tr) return; - const idx = Number(tr.getAttribute('data-row-key')); + const target = el.closest('[data-row-key]'); + if (!target) return; + const idx = Number(target.getAttribute('data-row-key')); if (Number.isFinite(idx)) dropTargetIndex.value = idx; }