feat: Adds relevant API to allow drag and drop to a certain location#23187
Merged
Conversation
Test case derived from a community feedback/question
…ation Added offset coordinates related to start and drop of the operation.
|
caalador
reviewed
Jan 13, 2026
Contributor
There was a problem hiding this comment.
Could add a junit test where the DragStartEvent has a non 0 offset value and drag ed event would validate the getDragStartOffsetX and getDragStartOffsetY values.
caalador
requested changes
Mar 6, 2026
# Conflicts: # flow-dnd/src/test/java/com/vaadin/flow/component/dnd/DragSourceTest.java # flow-dnd/src/test/java/com/vaadin/flow/component/dnd/DropTargetTest.java
…etX/Y Replaces Optional<Integer> with int returning 0 when no active drag source, so callers no longer need orElse(0). Also adds a unit test verifying drag-start offsets propagate to the drop event, and updates two merge-introduced test calls to the new constructor signatures.
caalador
approved these changes
May 6, 2026
|
manolo
pushed a commit
to vaadin/flow-components
that referenced
this pull request
May 7, 2026
fix flow-components test after vaadin/flow#23187
TatuLund
pushed a commit
to TatuLund/vaadin-flow-components
that referenced
this pull request
May 7, 2026
fix flow-components test after vaadin/flow#23187
Collaborator
|
This ticket/PR has been released with Vaadin 25.2.0-alpha6. |
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.



Exposes clientX/Y for all D&D events, to allow "repositioning" absolutely positioned drag and drop component. Also exposing offsets of the target and start element (if operation started on top of Vaadin component), so that one can build UIs where "things" are dragged on a specific location of another component.
Fixes #19297
Type of change