mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 06:55:59 +00:00
Fixes #1332 - Pasting an image from MobileSafari gives both url and file upload
This commit is contained in:
committed by
Stefan Ceriu
parent
3a538c6e29
commit
d0965c7f88
@@ -233,10 +233,11 @@ private class ElementTextView: UITextView {
|
|||||||
}
|
}
|
||||||
|
|
||||||
override func paste(_ sender: Any?) {
|
override func paste(_ sender: Any?) {
|
||||||
super.paste(sender)
|
|
||||||
|
|
||||||
guard let provider = UIPasteboard.general.itemProviders.first,
|
guard let provider = UIPasteboard.general.itemProviders.first,
|
||||||
provider.isSupportedForPasteOrDrop else {
|
provider.isSupportedForPasteOrDrop else {
|
||||||
|
// If the item is not supported for media upload then
|
||||||
|
// just try pasting its contents into the textfield
|
||||||
|
super.paste(sender)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user