onDrag conflicts with clicks on macOS

I have a list of navigation links that I want to be draggable. However, it seems like onDrag conflicts with mouse clicks on macOS (iOS is fine).

Here's some sample code:

Code Block swift
import SwiftUI
struct ContentView: View {
var items = ["Peter", "Mark", "Joe", "Frank", "Tim"]
@State var selected: String?
var body: some View {
NavigationView {
List {
ForEach(items, id: \.self) { item in
NavigationLink(destination: Text(item), tag: item, selection: $selected, label: {
Text(item)
.onDrag { () -> NSItemProvider in
return NSItemProvider(object: String(item) as NSString)
}
})
}
}
Text("")
}
}
}


Here's the weird part: if you click on the text, the item doesn't get selected and the link seems disabled. However, if you click on a section of the item that is empty, then it works!

Again, this works just fine on iOS. Is this a SwiftUI bug/limitation or am I doing it wrong?

Thanks!
I tested and it works. I can drag (but that does not movve name in the list)

I had just to set the window size to get multiple lines.
Code Block
struct ContentView: View {
var items = ["Peter", "Mark", "Joe", "Frank", "Tim"]
@State var selected: String?
var body: some View {
GeometryReader { geometry in
NavigationView {
List {
ForEach(items, id: \.self) { item in
NavigationLink(destination: Text(item), tag: item, selection: $selected, label: {
Text(item)
.onDrag { () -> NSItemProvider in
return NSItemProvider(object: String(item) as NSString)
}
})
}
}.frame(width: geometry.size.width, height: geometry.size.height)
}
Text("")
}
}
}


onDrag conflicts with clicks on macOS
 
 
Q