# 'New Tab' link opens both a new tab AND (unhelpfully) a download modal in Chrome

**URL:** https://meta.discourse.org/t/new-tab-link-opens-both-a-new-tab-and-unhelpfully-a-download-modal-in-chrome/314901
**Category:** Bug
**Tags:** pdf-previews, fixed
**Created:** [July 4, 2024, 12:33am UTC](https://meta.discourse.org/t/new-tab-link-opens-both-a-new-tab-and-unhelpfully-a-download-modal-in-chrome/314901 "2024-07-04T00:33:43Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![nathank](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/nathank/32/290039_2.png) [@nathank](https://meta.discourse.org/u/nathank)
#### Post date: [July 4, 2024, 12:33am UTC](https://meta.discourse.org/t/new-tab-link-opens-both-a-new-tab-and-unhelpfully-a-download-modal-in-chrome/314901/1 "2024-07-04T00:33:43Z")

</div>

This is regarding the links to pdfs generated by this TC:

> [@Inline PDF Previews](https://meta.discourse.org/t/inline-pdf-previews/157649):
>
> discourse2Summary Inline PDF Previews is a desktop-only theme component that will allow you to create previews for pdf attachments.eyeglassesPreview [Preview on Discourse Theme Creator](https://discourse.theme-creator.io/theme/Discourse/inline-pdf-previews) (desktop only)hammer_and_wrenchRepository Link [https://github.com/discourse/discourse-pdf-previews](https://github.com/discourse/discourse-pdf-previews)open_bookNew to Discourse Themes? [Beginner’s guide to using Discourse Themes](https://meta.discourse.org/t/beginners-guide-to-using-discourse-themes/91966) Install this theme component Features before after …

If `New Tab` is chosen in the TC settings (or a space placed before the filename within the square brackets), then the link does **both** of these things:

1. Opens a new tab with the pdf for direct viewing (_the desired behaviour_)

2. Opens the device’s download modal (_very unhelpful_)

## Demo Video

This was demonstrated using Chrome via ChromeOS. I’ll test it on other browsers shortly.

---

<div class="post-metadata">

### Author: ![Lhc\_fl](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/lhc_fl/32/268115_2.png) [@Lhc\_fl](https://meta.discourse.org/u/Lhc_fl)
#### Post date: [July 5, 2024, 4:09am UTC](https://meta.discourse.org/t/new-tab-link-opens-both-a-new-tab-and-unhelpfully-a-download-modal-in-chrome/314901/2 "2024-07-05T04:09:40Z")

</div>

~~Can’t reproduce it on Windows 11, Edge 126.0.2592.87 (Chrominum 126.0.6478.127) 🤔~~

The bug does exist. My Edge is too smart that helped me block this unnecessary downloads. 😇

---

<div class="post-metadata">

### Author: ![Lhc\_fl](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/lhc_fl/32/268115_2.png) [@Lhc\_fl](https://meta.discourse.org/u/Lhc_fl)
#### Post date: [July 5, 2024, 6:50am UTC](https://meta.discourse.org/t/new-tab-link-opens-both-a-new-tab-and-unhelpfully-a-download-modal-in-chrome/314901/3 "2024-07-05T06:50:36Z")

</div>

This PR should fix this bug:

[https://github.com/discourse/discourse-pdf-previews/pull/21](https://github.com/discourse/discourse-pdf-previews/pull/21)

---

<div class="post-metadata">

### Author: ![JammyDodger](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jammydodger/32/254611_2.png) [@JammyDodger](https://meta.discourse.org/u/JammyDodger)
#### Post date: [July 8, 2024, 7:00am UTC](https://meta.discourse.org/t/new-tab-link-opens-both-a-new-tab-and-unhelpfully-a-download-modal-in-chrome/314901/4 "2024-07-08T07:00:38Z")

</div>

This topic was automatically closed after 2 days. New replies are no longer allowed.
