How to open files in another tab.
smartpapers opened this issue · 4 comments
Hi @idleberg
I wanted to know if there is anyway I can make the PDF files open in another tab.
For example I browse through the lister from folder to folders etc.
Then whenever I open a PDF file or any sort of "File" not folder, It should open that thing in a new tab.
Is it possible?
Please let me know.
Thanks
At first I wasn't sure what you're asking for, but then I noticed that, with enable_viewer
set to true
, the default shortcut to open in a new tab (e.g. Cmd + mouse-click on macOS does not work). However, you can still select ”Open in New Tab” from the context menu or using the middle mouse-button (not sure if that's a default action).
With the viewer disabled, Cmd + mouse-click works fine. I'll have to look into the issue, why it's not working when the viewer is enabled.
@idleberg
No can we make it like we simply click on the document, Or tap as in mobile browsers and it opens the links in a new window?
What I want is...
That lister should open links in them in a separate new window maybe using a tag or something like target="_blank". E.g:
A link is clicked.
Bootstrap Lister page opens.
10 Files are listed there.
I click/tap on the file and it opens in a Separate/New window.
I have already disabled the viewer. It opens the files directly when I click on them but opens them on the same page, I want it to open in a new tab.
I'm very much opposed to the idea of using the target attribute for reasons described in this article. As I said before, there are better ways to open links in new tabs — use the tools every browser provides for that.
However, I'm going to leave this issue open and consider making Listr v3 more flexible, so that it's easier to customize it that way.
@idleberg So for now there is no solution to it?
Basically what I'm trying to do is display listr in an iframe on a page.
The problem is it works fine on Laptops and PCs but in a mobile browser the PDF opens but does not scroll down. It only shows the first page hence I was wondering if I could just force it to open in a new tab i.e: out of iframe.