Setting to turn off single-click link functionality within Live Preview Mode

Use case or problem

The new single-click link feature in Live Preview mode makes it frustrating to edit links.

I used to be able to click within links to edit them as I’m dealing a lot with placeholder text within my links, acting as hypertext to browse between notes.

With the new feature of single-clicking links, I am not able to click into the links to edit them anymore, and have to resort to awkward workarounds.


Ctrl+Click, the old solution to links in Live Preview mode which was removed, was never a problem for me.

I found switching between edit mode and Live Preview mode natural and easy using the Ctrl+E shortcut, and would normally browse through my notes in Reading Mode anyway, switching to Live Preview if I need to edit something.

Proposed solution

Give us a toggle setting to disable the single-click link functionality within Live Preview Mode.

This would bring back the way it worked before:

  • Non-clickable links within Live Preview Mode;
  • Ctrl+Click to open the link within the same pane; and
  • Ctrl+Shift+Click to open the link in a new pane.

Current workaround (optional)

Currently I’m having to select a larger portion of text for it to allow me to put my cursor into the placeholder text.

Sometimes this works, sometimes it clicks on the link anyway. This is largely inconsistent.

Another way I’m having to edit the placeholder text is to click my cursor at the end or at the beginning of the link, though it takes so many arrow key presses to get my cursor where I need it to be.

I could disable Live Preview mode altogether, though there are other conveniences to Live Preview mode which I’ve grown used to and would be disappointing to have to live without.

Related feature requests (optional)

Similar feature request suggesting Alt+Click as an alternative.

10 Likes

I have at least managed to disable the clicking functionality using this CSS snippet:

.markdown-source-view.mod-cm6 .cm-hmd-internal-link .cm-underline {
    pointer-events: none;
    cursor: text;
}

The only issue is, Ctrl+Click and Ctrl+Shift+Click doesn’t work anymore, so it’s still worse than what we had before.

4 Likes

+1
I ran into this same issue when I upgraded to 13.31 today. I’m okay with the change but it would be really nice to be able to toggle this feature and bring back the Ctrl+Click functionality.

1 Like

You can use click and drag (the mouse) or right-click (which we are gonna improve).

There’s some extra discussion on this topic over on the r/ObsidianMD subreddit:

For anybody coming here from reddit.

This change was made to:

  1. Make editor and reader behave in the same way.
  2. Since you likely write or edit the link a few times but visit it more times, we opted to facilitate the most frequent usage pattern.

You just need to select a character in the link. If you have reproducible steps of this not working in the help vault, please open a bug report.

1 Like

I would say that you’re right in that visiting links is probably more common, though in my case I always did that in Reading Mode.

If the update is meant to change it so that clicking through links in Live Preview Mode is the new best-practice workflow, making it so ideally you’re not having to switch between the two, then it disappoints in this regard—visually, this doesn’t look very appealling the way it works at the moment.

Sure, I was just able to reproduce this in the help vault just now so I’ll likely submit a bug report of this not working in the next week.

It’ll include a short video of me selecting link characters in the help vault and having it mostly working as intended, though sometimes clicking through regardless. It’s not exactly something I can discern why it happens as it’s inconsistent, though you’ll be able to see it happening in the video.

right-click could go into the editing mode straight away.

  1. either the right-click menu would open under the text, not obstructing it as it is now.
  2. the right click menu would not open, but would open on a second right click. (extra click, not that good)
    currently:

+1. i keep accidentally opening external links in live preview when i try to edit them.
it would be good if normal click didn’t open the link, but only ctrl click did as was suggested here. (ctrl + shift + click in new pane, again, as was suggested here)

we added ctrl-alt-click in 0.14 to edit only.

2 Likes

I downloaded 0.14. I appreciate you adding this functionality but it is still a pain to edit links which I do a lot. Can you add the ability to have a single key modifier? Something like Ctrl - Click?

One more thing. My old workflow was:
Open an existing note E.g., Daily Note > Type out link to new page E.g. [[thislink]] > Ctrl + Click to create new page and simultaneously open the link.

That last step no longer works either. So I have to click out of the brackets then go back and click on the link. For someone who does this many times a day this has made the ability to create new links in a note and then follow them significantly harder.

In that case, Use alt-enter or alt-shift-enter and don’t touch the mouse at all.

Just tested it. Alt-Enter does not do anything on my machine.

Can you just add in a setting to allow people to switch it back to the way it was before? It was dead simple before and now I have to train myself on two different keyboard shortcuts for things I previously did with a click or a ctrl click.

Another option would be to flip it to be the opposite way from how it was before. Click on a link and it opens the link. Ctrl click the link and it edits it. Unless it is already being edited in which case it opens the link.

Alt enter when the cursor is on the link works.