Skip to content

fix(cdk/drag-drop): avoid rendering pre-drop order in zoneless apps - #33881

Open
Sepandard wants to merge 1 commit into
angular:mainfrom
Sepandard:fix/drag-drop-zoneless-drop-order
Open

Sepandard wants to merge 1 commit into
angular:mainfrom
Sepandard:fix/drag-drop-zoneless-drop-order

Conversation

@Sepandard

Copy link
Copy Markdown
Contributor

When an item is dropped, the DropListRef resets the DOM to its pre-drag order and emits the dropped event. With zone.js change detection runs synchronously when the NgZone is exited so the new order is rendered before the browser paints. In zoneless apps change detection is scheduled asynchronously which allows the browser to paint the stale order in between, causing the dropped item to blink.

Fixes #33837.

When an item is dropped, the `DropListRef` resets the DOM to its pre-drag order and
emits the `dropped` event. With zone.js change detection runs synchronously when the
`NgZone` is exited so the new order is rendered before the browser paints. In zoneless
apps change detection is scheduled asynchronously which allows the browser to paint
the stale order in between, causing the dropped item to blink.

Fixes angular#33837.
@Sepandard
Sepandard force-pushed the fix/drag-drop-zoneless-drop-order branch from a4c6688 to 735ff4c Compare September 27, 2026 08:54

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug(cdk/drag-drop): in zoneless apps the pre-drop order is rendered after the drop, causing a visible blink

1 participant