Links to uploads should follow “Open all external links in a new tab” setting

Continuing the discussion from External links in history don’t follow “Open all external links in a new tab” setting:

I have found another instance where I would have expected the link to open in new tab.

  1. Have the “Open all external links in a new tab” setting enabled in your user preferences
  2. Go to this post
  3. Click any of the 3 links

These links break the Discourse browsing as they are links to attached/uploaded files, kind of technical folders (/uploads/…, etc.), not to regular Discourse pages (/t/…, /u/…, etc.)

They are not really external links but they are not normal Discourse browsing pages, either.
So maybe not a Bug

1 Like

You are right.

I’m gonna just move this to feature and we visit this again if it hits critical mass.

2 Likes

It happened to me once more, when I clicked the [screenshot] links over there.

Could this be related to if you have to open an uploaded PDF in PWA, to exit the PDF you need to Exit the PWA entirely

this is a mobile issue however, on Desktop i let the PDF download, and use Inline PDF Previews

before then i used Discourse send PDF inline

This bug is not only with PDF.

Please try the first example 3 jpeg links. They don’t open new tabs, but you lose Discourse context and navigation.

It’s even better to test on this very forum (meta):

This PNG link* does not open in a new tab (this is the bug).

But you still lose Discourse context and navigation, unexpectedly, so I think it should be treated like an external link.

* Manually copied from this post

i don’t think in cases apart from the PWA (Progressive Web App), you do lose navigation

I don’t use PWA, I don’t know what it is, exactly.

My bug report is for the regular use of (meta) Discourse website.

The “Open all external links in a new tab” option is there to make sure that all pages that are outside of (meta) Discourse navigation (menus), will open in a new tab.

Leaving the original tab with the (meta) Discourse page you were at.

Here, after I click this image link, when I hit the “Back” button, I will have to wait that Discourse website reloads entirely (and cross fingers so that it ends up on the same previous post, not the case here):

It should have opened in a new tab, like this other random external link.

Raw link for clarity

[this image link](https://meta.discourse.org/uploads/short-url/7QvdJ5fFitnZQCIyNJZjmeC6efL.png)
1 Like

89% sure this is because of throttling from your 4G provider, 1% sure it’s due to the CDN that meta are using

  • leaving a spare 10% because France is much bigger than the UK and overall 4G reception might be worse than i realise

It’s just because I’m out of Discourse in the same tab.

No problems hitting “Back” when inside Discourse.
No reloading.

It’s the whole point of my bug report: when sent out of Discourse, it should be in a new tab.

My bug report is not about PDF, PWA nor about slow Discourse initial loading. :wink:

I see, i opened another image on meta that was on CloudFront. I realise any upload whether on CDN/S3

or the server itself,

i also realise the bug from my own instance’s local uploads.

should be loaded in another tab.


I have voted on your feature request for the below various reasons.

and also because i don’t understand why PDFs download rather than open in another tab, i think we should have the option for that rather than thoka provide the necessary plugin.

I understand moodle have a way of displaying download page in a new tab, like the “Page is private or deos not exist” page on Discourse

I do hope this feature request gains much traction, because would be an especially large endeavour to upgrade Discourse, so the PWA is better than the Moodle App in all possible ways.