You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi love the plugin and regularlly use it but for some reason it's super inconsistent on iOS and for the life of me I can't figure out why. I've tracked a few things down and will note them below
clipboardData.getData("text/plain"); is null or blank string sometimes
I can't figure out why this is but swapping to navigator.clipboard.readText() fixes this and is always consistent. However if we await on the readText here it then causes the text to get over ridden on selection :(
Steps to reproduce this
Open safari and browser to a URL
Click Share and then Copy
Open Obsidian and Paste into a note
Pasting a link appears to automatically parse it into a URL causing the shouldPreserveSelectionAsTitle option to trigger even though before the paste event we didn't have anything selected
Adding a check to see if the selected text is the same as the paste text fixes this
It's worth noting that sometimes this isn't even an issue! I don't know what causes the inconsistency at all. For example if I copy a URL within obsidian and then paste it again the clipboardData is consistent.
The text was updated successfully, but these errors were encountered:
On my iPhone the title is properly fetched from Safari if I tap the URL and copy, but not if I do Share>Copy. Note that I get the "Allow copy" warning which might be part of the problem.
Either way works with Firefox.
Hi love the plugin and regularlly use it but for some reason it's super inconsistent on iOS and for the life of me I can't figure out why. I've tracked a few things down and will note them below
clipboardData.getData("text/plain");
isnull
or blank string sometimesI can't figure out why this is but swapping to
navigator.clipboard.readText()
fixes this and is always consistent. However if weawait
on thereadText
here it then causes the text to get over ridden on selection :(Steps to reproduce this
Open safari and browser to a URL
Click Share and then Copy
Open Obsidian and Paste into a note
Pasting a link appears to automatically parse it into a URL causing the
shouldPreserveSelectionAsTitle
option to trigger even though before the paste event we didn't have anything selectedAdding a check to see if the selected text is the same as the paste text fixes this
It's worth noting that sometimes this isn't even an issue! I don't know what causes the inconsistency at all. For example if I copy a URL within obsidian and then paste it again the clipboardData is consistent.
The text was updated successfully, but these errors were encountered: