Copy command in Live Preview context menu does not copy URLs

Steps to reproduce

  1. Ensure Obsidian is in Live Preview mode.
  2. Browse to a note that has an external URL in it.
  3. Right-click somewhere on the link to show the context menu
  4. Click “Copy”
  5. Paste the clipboard contents somewhere

Did you follow the troubleshooting guide? [Y/N]

Y

Expected result

URL of the link will be pasted.

Actual result

It varies, either pasting nothing (having not copied anything to the clipboard) or a string of text that is not the URL See details/examples in “Additional Information” below.

Environment

SYSTEM INFO:
Obsidian version: v1.8.9
Installer version: v1.8.4
Operating system: Darwin Kernel Version 24.3.0: Thu Jan 2 20:24:16 PST 2025; root:xnu-11215.81.4~3/RELEASE_ARM64_T6000 24.3.0
Login status: logged in
Language: en
Catalyst license: supporter
Insider build toggle: on
Live preview: on
Base theme: adapt to system
Community theme: none
Snippets enabled: 0
Restricted mode: on

RECOMMENDATIONS:
none


Additional information

Example from the sandbox vault follows below. Before attempting any Copy command, I have “cleared” the clipboard of previous text by filling it with non-text contents (usually a screenshot).

Take these two links:

Right-clicking on the bare URL sometimes selects the word under the mouse cursor:

Other times, it selects nothing:

In the former case, the Copy command copies the selected word:
obsidian

In the latter case, it copies nothing.

With links that have link text, it copies the whole Markdown link, complete with text:
[Obsidian](http://obsidian.md)

…unless that link’s text has multiple words in it:

In this case…

Attempting the Copy command over the first word copies that first word and the opening bracket.

So, this:

yields this: [Obsidian

Attempting the Copy command over the second word…

…copies nothing.

I am not sure there’s much of a bug here when nothing is selected.

Are you using native menus or not in the settings?

Yes, I’m using native menus (which I think is the default, but I can’t be sure).

If I turn that off and then right-click, this is what happens:

you need to download and reinstall obsidian to fix that.

On my end, if there’s nothing selected, the copy button is not active.

Ok, this is interesting. Now that I’ve reinstalled Obsidian with the latest installer, right-clicking seems to place the cursor and show the full menu (even with Native Menus enabled) all in one go:

So if the installer version made a difference it must’ve been an Electron bug or some weird interaction between Electron and Obsidian…?

Debug info after reinstall:
SYSTEM INFO:
Obsidian version: v1.8.9
Installer version: v1.8.9
Operating system: Darwin Kernel Version 24.3.0: Thu Jan 2 20:24:16 PST 2025; root:xnu-11215.81.4~3/RELEASE_ARM64_T6000 24.3.0
Login status: logged in
Language: en
Catalyst license: supporter
Insider build toggle: on
Live preview: on
Base theme: adapt to system
Community theme: none
Snippets enabled: 0
Restricted mode: on

RECOMMENDATIONS:
none