Skip to content

MWPW-194452 Observing Flickering effect while performing drag and drop#216

Open
KetakiD-Deshwandikar wants to merge 1 commit into
adobecom:devfrom
KetakiD-Deshwandikar:fix/MWPW-194452
Open

MWPW-194452 Observing Flickering effect while performing drag and drop#216
KetakiD-Deshwandikar wants to merge 1 commit into
adobecom:devfrom
KetakiD-Deshwandikar:fix/MWPW-194452

Conversation

@KetakiD-Deshwandikar

Copy link
Copy Markdown
Collaborator

Jira: MWPW-194452

Fixes flicker during drag-and-drop in Editor Preview when inserting Figma blocks into the DA panel and when reordering blocks in the right-hand pane.

Issue
During drag, the drop placeholder was repositioned incorrectly on every pointermove:

Figma → DA drop: When the cursor hovered the placeholder gap, elementFromPoint() found no [data-source] block, so the fallback forced the placeholder to the end of .da-panel and back — causing visible flicker.
Right-pane reorder: The dragged block itself was treated as the insertion target, so the placeholder ping-ponged above/below it as layout shifted under the cursor.

Fix
drag-drop.js: Skip the currently dragged block as an insertion target (targetBlock !== editState.draggedMainBlock). Only append the placeholder when it is not yet in the container; do not force-move it to lastChild on every move.
edit.css: Add pointer-events: none on .da-drop-placeholder so the placeholder does not intercept hit-testing.
Before:

flicker-before_4WB7oKyI.mp4

After:

flicker-fix-after_v2BaDzB3.mp4

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.

1 participant