chirun-ncl / chirun

A Python package providing the command line interface for building flexible and accessible content with Chirun.
https://chirun.org.uk/
Other
29 stars 4 forks source link

PDF takes over current tab #172

Closed prowlett closed 1 year ago

prowlett commented 1 year ago

When I click a PDF link, both Firefox and Chromium open the PDF in the current tab, overwriting the page I'm viewing.

I think if I click "Download as PDF" I'd expect the webpage I was on to still be open, with either the PDF downloaded in the background or the PDF opened in a new tab which my focus has switched to but the original webpage still there in another tab. If I click one of the "PDF" links, it's a bit more ambiguous, but still it's a nuisance for users to be taken out of the site navigation. I keep looking at the PDF then closing the tab and wondering where my notes site has gone!

christianp commented 1 year ago

This doesn't happen for me - the PDF file is downloaded and opens in a new tab automatically. Can you put a minimal example online somewhere, so I can check we're working with the same version of chirun?

prowlett commented 1 year ago

I just put it online and now the PDF downloads, so the problem is only happening when the webpage is a local file.

christianp commented 1 year ago

Ahh, I didn't get that because I serve my files from a local HTTP server. That's interesting to know, thanks!