Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/components/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

### Enhancements

- `Draggable`: Render the drag clone inside the `@wordpress/ui` compat overlay slot so it shares stacking with `@wordpress/ui` overlays opened mid-drag. Auto-enabled in WordPress environments; other hosts can opt in via `useEnableWpCompatOverlaySlot()` ([#78183](https://github.com/WordPress/gutenberg/pull/78183)).
- `Draggable`: Render the drag clone inside the `@wordpress/ui` compat overlay slot so it shares stacking with `@wordpress/ui` overlays opened mid-drag. Auto-enabled in WordPress environments; other hosts can opt in via `useEnableWpCompatOverlaySlot()` ([#78183](https://github.com/WordPress/gutenberg/pull/78183), [#78354](https://github.com/WordPress/gutenberg/pull/78354)).

## 33.1.0 (2026-05-14)

Expand Down
5 changes: 5 additions & 0 deletions packages/components/src/draggable/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,11 @@ export function Draggable( {

cloneWrapper.classList.add( ...cloneWrapperClasses );

const inSlotClass = styles[ 'is-in-compat-slot' ];
if ( compatSlot && inSlotClass ) {
cloneWrapper.classList.add( inSlotClass );
}

if ( cloneClassname ) {
cloneWrapper.classList.add( cloneClassname );
}
Expand Down
8 changes: 6 additions & 2 deletions packages/components/src/draggable/style.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,12 @@
padding: 0; // Should match clonePadding variable.
background: transparent;
pointer-events: none;
// Stacking fallback for when the clone is not routed into the
// `@wordpress/ui` compat overlay slot.
}

// Apply the stacking fallback only outside the `@wordpress/ui` compat
// overlay slot — inside it, the slot's isolated stacking context
// already handles ordering.
.clone:not(.is-in-compat-slot) {
z-index: z-index(".components-draggable__clone");
}

Expand Down
Loading