Stop message bubbles from stealing dropped files

Each bubble's UITextView keeps `isSelectable = true` so links remain
tappable, which also makes it a valid drop target — items dragged onto a
bubble landed on the text view instead of bubbling up to the timeline's
`.onDrop`. Disable `textDropInteraction` alongside the existing
`textDragInteraction` workaround.
This commit is contained in:
Quentin Gliech
2026-05-26 09:14:39 +02:00
committed by Stefan Ceriu
parent d06418a436
commit bc775a509c
@@ -173,6 +173,11 @@ struct MessageText: UIViewRepresentable {
// Otherwise links can be dragged and dropped when long pressed
textView.textDragInteraction?.isEnabled = false
// Otherwise items dropped onto a bubble land on the text view instead of
// bubbling up to the timeline's drop handler.
if let textDropInteraction = textView.textDropInteraction {
textView.removeInteraction(textDropInteraction)
}
textView.contentInset = .zero
textView.contentInsetAdjustmentBehavior = .never