Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(mobile): fix stale iOS header actions, covered composer, and swallowed pastes #6607

Closedx1xhlol(GitHub profile, opens in a new tab)wants to merge 3 commits intomain fromrefs/pull/6607/headopened View on GitHub

Showing 3 changed files with 43 additions and 3 deletions.

x
0 of 3 viewed, 3 left
14 additions and 2 deletionsapps/mobile/modules/t3-composer-editor/ios/T3ComposerEditorView.swiftModified
View file
@@ -101,7 +101,14 @@
$0.canLoadObject(ofClass: UIImage.self)
if !imageProviders.isEmpty {
- loadImages(from: imageProviders)
+ // Providers can claim image support but fail to load (stale cross-app
+ // pasteboard items); fall back to the system paste so text is never
+ // silently swallowed.
+ loadImages(from: imageProviders) { [weak self] handled in
+ if !handled {
+ self?.performSystemPaste(sender)
+ }
+ }
return
​
@@ -116,6 +123,10 @@
super.paste(sender)
​
+ private func performSystemPaste(_ sender: Any?) {
+ super.paste(sender)
+ }
+​
override func deleteBackward() {
guard selectedRange.length == 0, selectedRange.location > 0 else {
super.deleteBackward()
@@ -141,7 +152,7 @@