From 090d11711584fc5c01b243d44aee429ff48b0a8b Mon Sep 17 00:00:00 2001 From: Domingo Dirutigliano Date: Thu, 3 Sep 2026 18:42:16 +0200 Subject: [PATCH] Keep a dragged firewall rule at its measured width The Card carried Mantine's `w="100%"` prop, whose style props land in the style attribute after anything passed via `style`, so it overrode the pixel width dnd measures at lift time. On a `position: fixed` element `100%` resolves against the viewport rather than the list, so grabbing a rule snapped the card from 734px to 798px and pushed it past the right edge. Moving the width into `style`, ahead of the dnd spread, leaves normal flow untouched and lets the measured width win while dragging. --- frontend/src/pages/Firewall/index.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/frontend/src/pages/Firewall/index.tsx b/frontend/src/pages/Firewall/index.tsx index 7815c0a..cfd2c9b 100644 --- a/frontend/src/pages/Firewall/index.tsx +++ b/frontend/src/pages/Firewall/index.tsx @@ -199,9 +199,11 @@ export const Firewall = () => { radius="md" p="md" mb="md" - w="100%" bg="transparent" style={{ + // not the `w` prop: Mantine's style props would beat the width dnd measures, and + // `100%` against a `position: fixed` card resolves to the viewport, not the list + width: '100%', transition: 'border-color 0.2s ease', // dnd puts the drag transform/transition in here: it has to win over our defaults ...provided.draggableProps.style,