pengx17 / logseq-plugin-tabs

A Logseq plugin which lets you open pages in tabs like working in the browser
MIT License
303 stars 21 forks source link

Clicking on a different tab and then back on the first one - loses the context of the tab #67

Open mojothejojo opened 1 year ago

mojothejojo commented 1 year ago

Screenshot 2022-11-27 at 11 26 54 AM

As in the Screenshot - following are the steps:

  1. Initially we are on the Tab:1
  2. Click on Tab:2
  3. Then Click back on the Tab:1
  4. The context of the Tab:1 is lost - and one needs to drag the page all the way down to "reload" the page - upto the point where one was working on.
pengx17 commented 1 year ago

The context of the Tab:1 is lost

The position of tab:1 should persisted and when it is revisited it needs to scroll to the previous position. I guess the issue is that the length of tab:1 is very long and due to page lazy load optimization the scroll position may not be correct. Is the length of tab:1 very long? Will it work if you scroll it a bit, switch to tab:2 and switch back?

mojothejojo commented 1 year ago

Is the length of tab:1 very long?

  • Yes - the length of document is long Will it work if you scroll it a bit, switch to tab:2 and switch back?
  • nope - it is not restoring back to the position where I left it - and I need to explicitly remember the position where I was on a given tab.
mojothejojo commented 1 year ago

Is there any explicit config override / script that I can add on my install - so that this gets to work in the way I want?

pengx17 commented 1 year ago

Is there any explicit config override / script that I can add on my install - so that this gets to work in the way I want?

Not right now. You can fork the repo and fix the issue. I suppose the fix should be try to scroll multiple times until there are no lazy rendered elements.

gabrc52 commented 5 months ago

In https://github.com/logseq/logseq/issues/9721, someone mentions the "Save scrollbar position" plugin can be a workaround.

thowi commented 1 month ago

+1 would be great to fix and very annoying for larger pages.