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

FIX: Add stopPropagation to the click event #21

Merged
merged 1 commit into from
Jul 5, 2024
Merged

FIX: Add stopPropagation to the click event #21

merged 1 commit into from
Jul 5, 2024

Conversation

Lhcfl
Copy link
Contributor

@Lhcfl Lhcfl commented Jul 5, 2024

The PDF link click event listener lacks a stopPropagation, which causes an unnecessary download action to be triggered after opening the PDF preview

This commit adds it back.

Before:
Clicking the PDF link opens both a new tab AND (unhelpfully) a download modal in Chrome

After:
Clicking on a PDF link will only open a new tab preview

Related meta topic: https://meta.discourse.org/t/new-tab-link-opens-both-a-new-tab-and-unhelpfully-a-download-modal-in-chrome/314901

The PDF link click event listener lacks a `stopPropagation`,
which causes an unnecessary download action to be triggered after opening the PDF preview

This commit adds it back
@Lhcfl Lhcfl merged commit 24c623a into main Jul 5, 2024
3 checks passed
@Lhcfl Lhcfl deleted the fix/stop branch July 5, 2024 07:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants