mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-10-31 16:24:11 +00:00
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:
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
|
||||
|
||||
Reference in New Issue
Block a user