Skip to content

fix(TreeDropTargetDelegate): only normalize to 'after' target if valid #8563

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 16, 2025

Conversation

reidbarber
Copy link
Member

@reidbarber reidbarber commented Jul 16, 2025

Closes #8561

We normalize to the 'after' drop target, but previously this could have been one of the dragged items (not a valid drop target). Now, we make sure the normalized target is a valid drop target before using it.

✅ Pull Request Checklist:

  • Included link to corresponding React Spectrum GitHub Issue.
  • Added/updated unit tests and storybook for this change (for new code or code which already has tests).
  • Filled out test instructions.
  • Updated documentation (if it already exists for this component).
  • Looked at the Accessibility Practices for this feature - Aria Practices

📝 Test Instructions:

Try steps from #8561

🧢 Your Project:

@reidbarber reidbarber changed the title only normalize to 'after' target if valid fix(TreeDropTargetDelegate): only normalize to 'after' target if valid Jul 16, 2025
@rspbot
Copy link

rspbot commented Jul 16, 2025

@reidbarber reidbarber added this pull request to the merge queue Jul 16, 2025
Merged via the queue into main with commit 5644a71 Jul 16, 2025
32 of 34 checks passed
@reidbarber reidbarber deleted the TreeDropTargetDelegate-normalize-valid-target branch July 16, 2025 23:22
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.

RAC Tree drag and drop does not reorder items correctly at top level
4 participants