Live preview: Double click a word and type some text: sometimes too much text is removed

(The title may be quite confusing, so please feel free to edit it if you have ideas on how to make it clearer.)

When I double click a word in order to select it and then replace it with something by typing, sometimes Obsidian will remove more text than just the highlighted word. Circumstances:

  • The text must be in a list item.
  • You need to first click some italized text before double clicking a word. Then double click some text after the italic text.
  • After double clicking, type some text.

I haven’t tested these:

  • Numeric list items
  • Bold text
  • The legacy text editor

Steps to reproduce

See this video I recorded: Obsidian double click bug - YouTube

(The video is unlisted on YouTube, so it’s only visible for people who know the link.)

Expected result

Only the selected/higlighted word should be removed and replaced with the typed text.

Actual result

All italic text is removed.

Environment

  • Operating system: Windows 10
  • Debug info:
    SYSTEM INFO:
    Obsidian version: v0.13.23
    Installer version: v0.12.15
    Operating system: Windows 10 Home 10.0.19042
    Login status: logged in
    Catalyst license: none
    Insider build toggle: off
    Live preview: on
    Legacy editor: off
    Base theme: light
    Community theme: Red Graphite
    Snippets enabled: 0
    Safe mode: off
    Plugins installed: 2
    Plugins enabled: 0

RECOMMENDATIONS:
Custom theme: for cosmetic issues, please first try updating your theme to latest. If still not fixed, please try to make the issue happen in the help vault or disable community theme and snippets.


hi, does it happen with the default theme? does it happen in the help vault?

I tested now, yes, it happens in the help vault too, with the default dark theme enabled.

Thanks for the tip about testing in the help vault, I’ll try to remember it next time I report some bug. :slight_smile:

I don’t know why but I can’t reproduce your problem. Does downloading and reinstalling obsidian help?

Why is the bullet point red in you first video recording?

Animation16

Strange. I tested more:

  • Tried also on my Linux machine (Xubuntu 20.04): The installer version was some 0.9.x, and Obsidian version 0.13.23.

    1. I was able to reproduce the bug just like in the video that was recorded on Windows 10. The bug happened for both the bullet list item and the task list item.
    2. I upgraded the “installer version” by downloading a new AppImage from Obsidian.md. Now installer version is 0.13.23.
    3. Then tried to reproduce the bug: the bug only reproduces on a task list item, not on a normal bullet list item anymore.
  • Another try on Windows:

    1. Restarted the computer and upgraded the “installer version” by downloading a new installer from Obsidian.md, then reinstalled Obsidian. Now installer version is 0.13.23.
    2. Tried to reproduce the bug, and it happens just the same way as in the video, both on the bullet list item and on the task list item.

I guess it’s due to the Red graphite theme I’m using, it has some red accents. (I’m probably using some old version of it, I think I haven’t upgraded in a year maybe?)

@WhiteNoise may I ask on what operating system did you try this? :slightly_smiling_face:

Can someone else test this, too? :slightly_smiling_face: Just asking 'cause I’m hitting this issue quite often.

Tried it on macOS and the latest Obsidian / installer. Can’t repeat the issue in my vault or the help vault.

Angel

1 Like

Thank you for trying! :slightly_smiling_face:

Maybe it somehow only occurs on Windows and Linux?

I am on windows. I don’t think it’s linux problem either. I think it something specific to your input methods.

1 Like

I tested this more. This is a bit simpler way to test it:

  1. First the caret needs to be located outside of italic text.
  2. Double click a word in the middle of an italic text (so that the word does not beging or end with a star *, i.e. italic2 in the example).
  3. Type something.

This does not occur every time, might need multiple retries. Also it most likely happens on bullet list lines and task lines, but this time I was also able to reproduce it on the non-list line, but just a couple of times (unfortunately it did not happen when recording the below gif).

Obsidian-double-click-bug

This is in help vault, on Windows 10. I tested on Linux too (again), and the same happened on there too. The machines are different and use different keyboards and mice. So it should not be anything input hardware specific.

Thank you for your patience with this! :slight_smile:

Hi @WhiteNoise ! :slightly_smiling_face:

I noticed this thread was moved to Bug graveyard. Were you able to reproduce and fix it?

At least for me it still occurs in the Sandbox vault of Obsidian 0.14.6.

Thanks!

I can’t reproduce it.