Reading Mode: Ctrl + a and then ctrl + c doesn't copy all text in long document

Steps to reproduce

NOTE: This is a separate issue from Ctrl+A Ctrl+C (Cmd+A Cmd+C) does not copy text in preview - #24 by obsidian.md

NOTE: In order to re-create this issue, you must avoid the above issue by going to settings | appearance and disable “show tab title bar”

  1. Go to settings | appearance and disable “show tab title bar”
  2. Create a very long note, for example:
    test.md (6.2 KB)
  3. Switch to reading mode
  4. Navigate to another note and back to this note
  5. Hit ctrl + a
  6. Hit ctrl + c
  7. Open another app and paste the text

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

Yes

Expected result

When you have all text selected with ctrl + a, ctrl + c should copy all of the highlighted text to the clipboard

Actual result

You’ll see that it doesn’t actually copy the entire note. In my example, it copies the first 5,506 characters out of 6,307 characters.

NOTE: This might be related to headings, because the missing text is exactly the last heading section… The “Where can I get some” Heading (and text below it) is what’s missing in the clipboard.

I was also able to re-create this issue with one of my actual notes, and in that case it was exactly the last three heading sections that are missing from the clipboard.

EDIT: The amount of text that’s copied depends on the size of the obsidian window. The smaller the window, the less text is copied.

NOTE: If you scroll all the way to the bottom of the note (after hitting ctrl + a, and before hitting ctrl + c), it will copy all text as expected.

Environment

SYSTEM INFO:
Obsidian version: v1.8.10
Installer version: v1.8.10
Operating system: Windows 11 Pro 10.0.26100
Login status: logged in
Language: en
Catalyst license: insider
Insider build toggle: off
Live preview: on
Base theme: adapt to system
Community theme: none
Snippets enabled: 0
Restricted mode: on

RECOMMENDATIONS:
none

This happens because not all text is rendered (for performance reasons).

We are considering disabling Ctrl-a, because it’s broken in too many ways. I suggest you look into one of the plugins that “copy/export as html”.

Obsidian is a great piece of software that works well even on fairly old devices (with the exception of Graph and Canvas), but this “optimization” causes a lot of inconvenience for users (Ability To Prevent DOM Element Removal In Active Note, Nav Tree, etc), and I hope that the developers will find a solution to this problem and will not continue to ruin Obsidian’s capabilities just because of this optimization, despite its importance.

2 Likes

will be fixed in 1.10.x. No ETAs.

Cmd-A Cmd-C in reading mode will copy the whole SOURCE code of file.

If you want to copy the rendered version (HTML), follow here.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.