Skip to content

erichchampion/dropDestinationBug

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

dropDestination Bug – Minimal Reproduction

Minimal SwiftUI iOS app that demonstrates the bug where dropDestination does not work when both the drag source and drop target are inside the same List.

Reference: Apple Developer Forums – dropDestination does not work inside List (thread 730367). Related Feedback: FB12980427.

Environment

  • Xcode: 15.x / 16.x (as available)
  • iOS deployment target: 16.0+
  • Platform: iOS (bug is iOS-specific; macOS may behave differently)

How to run

  1. Open DropDestinationListBug.xcodeproj in Xcode.
  2. Select an iOS simulator or device (e.g. iPhone 15, iOS 17).
  3. Build and run (⌘R).

Steps to reproduce (for bug report)

  1. Run the app on iOS (simulator or device).
  2. Ensure the segmented control at the top is set to "List (broken)".
  3. Long-press on the text "Drag this" and drag it downward onto the pink "Drop here" area.
  4. Observe: The drop zone does not highlight (no blue border), and releasing the drag does nothing. Neither the isTargeted closure nor the drop action is called.

Expected behavior

  • While dragging over the drop zone, it should show visual feedback (blue border from isTargeted).
  • On drop, the drop zone should accept the string and display "Last: demo".

This is exactly what happens when you switch to "VStack (works)" and repeat the same drag-and-drop.

Actual behavior

  • With List: The drop destination inside the same List never receives the drag. No highlight, no drop. The dropDestination(for:action:isTargeted:) modifier appears to be ignored when the drop target is a subview of the same List that contains the .draggable source.
  • With VStack: Drag and drop works as expected.

What to submit to Apple (Feedback Assistant)

  • Category: SwiftUI
  • Title (suggestion): "dropDestination not called when drop target is inside same List as drag source (iOS)"
  • Description: Summarize the issue and include the steps above. Attach this project (zip the repo or the DropDestinationListBug folder and the .xcodeproj).
  • Optional: Screen recording comparing List (no response) vs VStack (response) on iOS.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages