Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Links to section within a journal entry page not working. #1274

Closed
farling42 opened this issue Oct 6, 2022 · 4 comments
Closed

Links to section within a journal entry page not working. #1274

farling42 opened this issue Oct 6, 2022 · 4 comments
Labels
bug Something isn't working

Comments

@farling42
Copy link

If I include a link to a section within a journal page, such as

@UUID[JournalEntry.Qdr4gy63qpopczui.JournalEntryPage.hZlVZlCWMToeRmPO#another-header]{Another Header}

Clicking on the link only opens the specific page within the journal, it does not honour the section header "#another-header"

This is working properly in other game systems, but the "data-hash" parameter that is put onto the "a href" in the HTML of the journal page containing the button does not seem to be getting passed to the journal opening routine.

@farling42 farling42 added the bug Something isn't working label Oct 6, 2022
@farling42
Copy link
Author

farling42 commented Oct 7, 2022

With some debugging, it looks like the originalTarget is wrong in the event passed to TextEditor._onClickContentLink

In CoC7 the originalTarget is the entire window, whereas in other systems it is just the a.content-link element

Tracing _onClickContentLink further, the event has the correct currentTarget on entry, but after "await fromUuid" the event.currentTarget has changed to point to the window instead of the link element.

@snap01
Copy link
Collaborator

snap01 commented Oct 8, 2022

A fix for this should be included in the next release

@snap01
Copy link
Collaborator

snap01 commented Oct 18, 2022

Can you please confirm if this issue can be closed with the latest 0.9.2 release?

@farling42
Copy link
Author

Yes, this is working correctly in 0.9.2
Thanks very much for providing the fix.
Users of "PDF Pager" will be very happy :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants