[lexical-playground] Bug Fix: Show draggable block target line when dragging images#8015
Merged
etrepum merged 1 commit intofacebook:mainfrom Dec 10, 2025
Merged
Conversation
Updates the dragover event handler to correctly prevent default behavior, resolving an issue where the image drag and drop target line was not consistently displayed.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
etrepum
approved these changes
Dec 10, 2025
Collaborator
etrepum
left a comment
There was a problem hiding this comment.
The target line only shows when the DraggableBlockPlugin handle is dragged, not the image itself. This seems like expected behavior, at least as far as this PR is concerned.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Updates the dragover event handler to correctly prevent default behavior, resolving an issue where the image drag and drop target line was not consistently displayed.
Description
Current behavior: When dragging an image in the editor, the
$onDragoverfunction in ImagesPlugin returns true, which stops theDRAGOVER_COMMANDevent propagation. This preventsDraggableBlockPluginfrom displaying thedraggable-block-target-lineindicator.Changes in this PR: Changed
$onDragoverto return false instead of true, allowing the event to propagate toDraggableBlockPluginso it can display the target line during image drag operations.Test plan
Before
Screen.Recording.2025-12-02.at.2.53.29.PM.mov
After
Screen.Recording.2025-12-02.at.3.10.12.PM.mov