pashashocky / obsidian-note-gallery

A masonry note gallery for obsidian.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[FR] Open in new tab

MehulAjax21 opened this issue · comments

Hi Pasha,

Amazing plugin. Is it possible to open a note in new tab or go back to the same view after viewing a clicked note? This is important because it is currently inconvenient to scroll down again to a point after opening a note and going back (going back opens top of the page)

commented

This is already built in :)
Here's how it's used - might need to add it to the README in #16.

https://github.com/pashashocky/obsidian-note-gallery/blob/main/src/react/components/Card.tsx#L22-L27

Does this not work for you?

I'd really have to build in the return to last scroll position, but haven't figured out how to do that well yet.

I see. Thanks for your comment. It indeed works on PC (ctrl + click opens in new tab).
However, I was not able to use it on a mobile as well as tablet. This is where I tested first.

I have an idea if if makes sense. I think, it will not hurt to make default click behaviour to open in new tab. In that way, it will never lose a view and it will always keep note gallery view open. If someone wants to really close the note gallery view, he can close it manually.

I think most people will not mind if the original note gallery view always open a note in new tab.