Fixed in https://github.com/badbundle/vault-app/pull/663 (merged as 905c31e5).
Cut and Copy in text being edited now go through Vault's Pasteboard: Clear Clipboard's expiry, the Universal Clipboard settings and concealed marking.
- How: I didn't rebuild the inputs in UIKit. SwiftUI draws its fields and editors with subclasses of
UITextField/UITextViewwhosecopy(_:)/cut(_:)call through to the base classes' own.EditedTextClipboard, installed at launch, replaces those two. - What Cut and Copy do: the selection goes to
Pasteboard.copy, and Cut then deletes it withdeleteBackward(), so SwiftUI's binding follows. This covers the edit menu and ⌘C/⌘X alike, in every field, with no field rewritten and nothing raw ever reaching the clipboard. A secure field still copies nothing. - What text is copied as:
LabeledTextField(copyingAs:)tells the clipboard what its text is while focused. The note's contents follow the Notes switch. Everything else (setup key, descriptions, passphrases, recovery phrase words, search) stays on this device.
Dragging a code card out: dropped. A card now offers only its ID, which is all reordering the feed needs, and no text for another app. VAULT-38 already turned off dragging selectable text out for the same reason: it skips the settings, and on an iPad it can reach another device over Universal Control whatever Universal Clipboard allows. Tap or Copy Code still copies a code.
Testing:
- New
EditedTextClipboardTestscover copy and cut in a text field, a text editor and a vertical text field, the Notes setting, secure fields, and the drag's content types. - In the Simulator, ⌘X in a new code's Key field showed "Copied", emptied the field, disabled Continue, and put the key on the clipboard.
Not covered: dragging selected text out of a field being edited, which UIKit still allows, would also skip the settings. Turning it off needs each field's drag interaction. Say if you want it done.