Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Last scrollbar position is not restored when opening a page #1624

Open
lorenrosen opened this issue Sep 26, 2021 · 8 comments
Open

Last scrollbar position is not restored when opening a page #1624

lorenrosen opened this issue Sep 26, 2021 · 8 comments

Comments

@lorenrosen
Copy link

lorenrosen commented Sep 26, 2021

(This is slightly different from bug 1622.) When I open a previously viewed page in the same notebook (using, say, the buttons towards the top listing bookmarks and recently viewed pages), the cursor is as it was, but the viewport and scrollbar are at or near the beginning of the page (at least if the page is long enough so it won't all fit in the window, and the cursor isn't near the top of the window).

A simple workaround: move the cursor back-and-forth using the arrow keys (that is, ← then →) when first viewing a page. This has the side effect of moving the viewport so the cursor is visible.

This is on Ubuntu 20.04 -- though I could well believe it's timing-related and sensitive to the details of the whole hardware/software stack.

@charles-esterbrook
Copy link

I have this identical issue with the viewport being incorrect when switching pages on Zim 0.74.1 installed on Windows 10. The problem happens whether I select the pages through the Index pane or switch pages with Alt-Left and Alt-Right.

Steps:

  1. Select a long page through Index.
  2. Scroll down half way through the page content.
  3. Place cursor with mouse click.
  4. Select a different page through Index.
  5. Select the first page again through Index.

The cursor will be restored to its correct location, but the scroll position / viewport will not be correct. In fact, the cursor will be out of sight.

Workaround: Moving it with any of the 4 arrow keys will initiate the scrolling.

@sojusnik
Copy link
Contributor

Related to #92 and #1276

@lorenrosen
Copy link
Author

Similarly, when traversing a link to a section of a page, zim places the cursor at the beginning (right before the heading), but places the viewport at the beginning of the page. This may be the origin of bugs reporting section linking doesn't work, e.g. #1617

@jaap-karssenberg
Copy link
Member

jaap-karssenberg commented Sep 29, 2021 via email

@lorenrosen
Copy link
Author

lorenrosen commented Sep 29, 2021 via email

@bruvellu
Copy link
Contributor

This happens for me in a long page containing only a numbered list with links to other pages (~300 items). Source of the first few lines look like this:

Content-Type: text/x-zim-wiki
Wiki-Format: zim 0.6
Creation-Date: 2017-11-14T09:47:08+01:00

====== Notebook ======
Created Tuesday 14 November 2017

1. [[+Order FlyFos btd construct|Order FlyFos btd construct]]
2. [[+Order first Bloomington flies|Order first Bloomington flies]]
3. [[+Imaging knrl and bnb|Imaging knrl and bnb]]
4. [[+First imaging of Gap43|First imaging of Gap43]]
5. [[+SD3 imaging second try with Gap43|Second try with Gap43]]

@introt
Copy link
Collaborator

introt commented Jan 16, 2022

This sounds like a duplicate of #1276. #1871 contains steps to reproduce, seems to happen with long pages w/ lots of images (edit: images aren't required to reproduce)

@vossenjp
Copy link

It happens with just long pages, you don't need images, see code to create a page at the top of #1276. I think this might also be related to the garbled text in #727.

@jaap-karssenberg jaap-karssenberg modified the milestones: 0.74.4, Next Feb 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants