Skip to content

MetaBind button with open link action ignores link fragment parameters #374

@voltel

Description

@voltel

Please fill out these Check-boxes

  • I checked that the plugin is up to date
  • The issue persist with all other plugins and themes disabled

This Issue Occurs on

  • Windows
  • Linux
  • macOS
  • Android
  • iOS

Plugin Version

1.1.2

Describe the Issue

With the following markup for a MetaBind button, the source PDF will be opened, but not on the needed page as requested by the link fragment parameters #page=132&selection=16,15,17,11 (and highlights won't work either).

Basically, the part after the hash symbol in the link is ignored.

```meta-bind-button
style: primary
label: "See PDF source file "
action:
type: open
link: "[[source_file.pdf#page=132&selection=16,15,17,11]]"
```

Steps to Reproduce

  1. Make sure your vault has a PDF file with several pages and lots of text (e.g., drag&drop a file onto Obsidian note in edit mode)
  2. Open PDF file in the standard Obsidian PDF viewer
  3. Scroll in the PDF to any arbitrary page far from the page on interest, e.g. the last page
  4. Close the PDF file in the viewer
  5. Add the MetaBind button markup in an Obsidian note

```meta-bind-button
style: primary
label: "See PDF source file "
action:
type: open
link: "[[source_file.pdf#page=132&selection=16,15,17,11]]"
```

  1. In the note View mode, click the button. Observe the behaviour:
  • the PDF file will be opened
  • the presented page is the last page viewed, and not the page of interest indicated in the link's fragment after the hash.

Expected Behavior

After clicking on the button, the PDF file is opened on the page indicated in the link after the # symbol (fragment part).
If the PDF is already opened, the viewer scrolls to the page of interest and highlights the text as indicated in the link's fragment.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugUndesired behavior caused by this plugin

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions