Fixes #1332 - Pasting an image from MobileSafari gives both url and file upload

This commit is contained in:
Stefan Ceriu 2023-07-18 13:41:15 +03:00 committed by Stefan Ceriu
parent 3a538c6e29
commit d0965c7f88

View File

@ -233,10 +233,11 @@ private class ElementTextView: UITextView {
}
override func paste(_ sender: Any?) {
super.paste(sender)
guard let provider = UIPasteboard.general.itemProviders.first,
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
}