Skip to content

[6.x] Forms 2: Keep dragged field type buttons the same shape - #16162

Merged
jaygeorge merged 2 commits into
6.xfrom
16162-dragged-fieldtype-button-shape
Dec 3, 2026
Merged

jaygeorge merged 2 commits into
6.xfrom
16162-dragged-fieldtype-button-shape

Conversation

@jaygeorge

@jaygeorge jaygeorge commented Dec 3, 2026 •

Copy link
Copy Markdown
Contributor

Description of the Problem

Closes #16158

When you drag a field type button in the form builder, the copy under your cursor is squarer and taller than the button you picked up.

image

What this PR Does

The buttons got their shape (rounded-xl, h-9, normal weight, truncation and so on) from [&_button] rules on the panel around them. The drag mirror is appended to <body>, outside that panel, so it lost them and fell back to the default button.

The styles now sit on the button itself, so the mirror keeps them. That also makes the inline width and alignment the drag handler was setting on the mirror's button redundant, so they're gone.

The buttons in the panel look exactly as they did.

Before / After

image

How to Reproduce

  1. Open any form's Edit tab.
  2. Drag a field type from the left panel.
  3. The dragged copy has different corners and height to the button.

- Move the button styles from the panel's [&_button] rules onto the buttons themselves
- The drag mirror is appended to <body>, outside the panel, so it lost them
@jaygeorge
jaygeorge enabled auto-merge (squash) December 3, 2026 11:06
@jaygeorge
jaygeorge merged commit 494a38d into 6.x Dec 3, 2026
65 checks passed
@jaygeorge
jaygeorge deleted the 16162-dragged-fieldtype-button-shape branch December 3, 2026 11:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Form Builder: Dragged buttons are a different shape

1 participant