1.9.1: PDF deep links to some text selections cannot be copied / text selection is not smooth

Steps to reproduce

  • In Obsidian 1.9.1, add this sample PDF to the sandbox vault.
  • Make a text selection that ends at the end of a line, for example:
  • Right-click to open a context menu.

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

Y

Expected result

As in Obsidian 1.8.10, “Copy as quote” & “Copy link to selection” should be displayed.

In other words, the range of the text selection should be properly recognized by Obsidian.

Actual result

Those two menu items are not shown.

In other words, Obsidian fails to recognize the text selection range. (Please see “Additional information” for more details!)

Environment

SYSTEM INFO:
Obsidian version: v1.9.1
Installer version: v1.8.10
Operating system: Darwin Kernel Version 24.5.0: Tue Apr 22 19:48:46 PDT 2025; root:xnu-11417.121.6~2/RELEASE_ARM64_T8103 24.5.0
Login status: logged in
Language: en
Catalyst license: insider
Insider build toggle: on
Live preview: on
Base theme: adapt to system
Community theme: none
Snippets enabled: 0
Restricted mode: off
Plugins installed: 0
Plugins enabled: 0

RECOMMENDATIONS:
none


Additional information

1. Text selection range detection is failing because the selection ends in div.textLayer instead of a Text node

After selecting a text range that ends at the end of any line, run getSelection().focusNode in the dev console.
Obsidian 1.8.10: focusNode = a Text node

Obsidian 1.9.1: focusNode = the entire textLayer of the page

2. Text selection in general feels more unnatural/jerky in 1.9.1.

1.8.10: Nice and smooth

Screen Recording 2025-05-29 at 0.01.16

1.9.1: Selection fails to expand when the mouse is moving outside of the text region

Screen Recording 2025-05-28 at 23.57.31

I noticed the onTextSelectionPointerDown method has been removed in 1.9. I’m wondering if this can be the cause of the issue.

This is caused by upstream regression introduced by pdf.js when we updated.
It should be solved when we update again in v1.9.3

1 Like