Handoff Bug - Pasting text from handoff inserts the path to the text snippet instead
CompletedIf I copy some text on my iPhone and then try to paste it in nvUltra, rather than pasting the text, it pastes the path to the snippet instead, for example ../../../../../../../var/folders/3_/4mybnwks12jfqh3sq93yn5p80000gp/T/com.apple.useractivityd/shared-pasteboard/items/FE2714B9-456A-4FC4-9339-0B9EC3F66B28/eca18b90ebfb0230808394440eb350f70083adfd.rtfd
-
When I try it, it works fine.
You are pasting RTFD, which might imply that you are pasting an image with text? That won't work, since nvUltra is a plain text editor.
0 -
I thought I was just pasting text, but perhaps there was extra formatting inside. Trying again, it looks like it happens when I copy text from the Tot app on the iPhone.
0 -
What happens if you paste from Tot on iPhone to a strict text editor on Mac (e.g. Sublime Text or TextWrangler or BBEdit or something like that)?
What happens if you intentionally copy rich text from another app on iPhone (e.g. Apple's Notes app with bold/italicized text) and paste into nvUltra (this also works fine for me).
0 -
If I paste from Tot on iPhone to Sublime Text, it works. If I paste from Apple Notes, it works in Sublime Text, but not in Tot. I am running iOS 14 beta on my iPhone, so perhaps that is the problem. If I look at the file that is linked to, it is an .rtf file inside a folder and the contents of the file are:
{\rtf1\ansi\ansicpg1252\cocoartf2565
\cocoatextscaling1\cocoaplatform1{\fonttbl\f0\fnil\fcharset0 .SFUI-Regular;}
{\colortbl;\red255\green255\blue255;}
{\*\expandedcolortbl;;}
\deftab720
\pard\pardeftab720\pardirnatural\partightenfactor0\f0\fs34 \cf0 random text\
\'95 random text\
\'95 random text\
\'95 random text}0 -
It looks (looked?? see below) like Tot only sends rich text to the pasteboard, and does not also send a copy of plain text (which seems to be the "correct" way to do it, as evidenced by testing what TextEdit and other Apple applications send.)
I don't have Tot for iOS, but installed the macOS version and it also fails to send plain text. However, when sending from macOS I don't end up with the file path as you do.
It *seems* as though Tot for iOS (perhaps when interacting with handoff) is not sending a plain text copy of the text in addition to the rich text version?
**Addendum**
Strangely, as I continued to test and experiment, the clipboard types that I was receiving from Tot changed, and then *did* include plain text and pasting started to work. I have no explanation for that. So pasting (both from Tot on same Mac and from Tot on a different Mac using handoff) started to work, despite not working initially.
What I can say is that nvUltra looks at two things when pasting:
1. Does the pasteboard contain a URL (e.g. copying from the address bar of a browser)? If so, paste the URL (which includes some smart behavior to handle making Markdown links when pasting onto selected text).
2. Otherwise, look for plaintext (specifically `NSPasteboardTypeString`) and use that (but also check to see if the string content is actually just a URL as plain text).
0 -
Is this still an issue for you? I have not experienced any other challenges with copy/paste across handoff, though it is admittedly not something I do often.
0 -
I hadn't tried again until now, but it seems that it still occurs with formatted text from apps such as Tot or Safari.
0 -
The Safari comment was useful -- allowed me to replicate. Thanks!
This should be fixed for upcoming release.
0 -
Thanks for still working on this minor problem!
0 -
Thanks for the submission and the means to replicate!
0
Please sign in to leave a comment.
Comments
10 comments