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

Text cursor always jumps to page title … #611

Closed
sojusnik opened this issue Jan 16, 2019 · 9 comments
Closed

Text cursor always jumps to page title … #611

sojusnik opened this issue Jan 16, 2019 · 9 comments

Comments

@sojusnik
Copy link
Contributor

… when a new page is opened or a page is refreshed.

Ideally, Zim should remember the last position within a page, see here for details.

Happens with Zim 0.70-rc1 on Ubuntu 18.10.

@sojusnik
Copy link
Contributor Author

Still doesn't work as expected.

Just write something and then reload the page or jump to another one. You'll see that the page view won't stay where the text cursor is, but jumps somewhere else.

@jaap-karssenberg
Copy link
Member

jaap-karssenberg commented Jan 18, 2019 via email

@sojusnik
Copy link
Contributor Author

I'm using the RC from your Snapshots PPA.

@jaap-karssenberg
Copy link
Member

jaap-karssenberg commented Jan 18, 2019 via email

@sojusnik
Copy link
Contributor Author

sojusnik commented Feb 6, 2019

It's still not working reliably :/

The cursor stays at its place when changing from one page to another, but not after a new page was created and then Zim was closed.

To reproduce: create a new page (the page title must not have been used before), then fill some text that spans over the whole page so that you have to scroll, save and quit = the cursor will appear before the page title.
Open Zim, write something somewhere on this page and close Zim = the cursor will appear again before the page title.
Open Zim, write something somewhere on this page or just change the position of the cursor and then switch to another page and come back = the cursor position is finally saved!
But if you'll write something or change the cursor position after that, and then close Zim, then the position won't be saved again. The cursor will appear at the place before the switch to another page happened (see the preceding paragraph).

Regardless of this, when a page is refreshed, then the cursor stays at its place, but the window scrolls up.

Observed with the latest v0.70-rc2 from the Snapshots PPA on Ubuntu 18.10.

@sojusnik
Copy link
Contributor Author

The same is true for saving window size and state – it is only saved after changing to another page and not after quitting. Happens even with the help window.

@sojusnik
Copy link
Contributor Author

sojusnik commented Apr 6, 2019

Is there a certain reason why this issue isn't reopened? It's still there in 0.70+

@aqeeliz
Copy link

aqeeliz commented Dec 7, 2021

Did a quick test, it seems zim only saves cursor position when switching page, it doesn't save it when quitting.

An easier test would be, open any page, let's say cursor is initially at position A, move cursor around to position B.
Now, if you quit without switching to another page, when you next open zim, cursor will be back at position A.
But, if you switch to another page, and then quit (or directly return to page), it will now be at position B.

jaap-karssenberg added a commit that referenced this issue Dec 9, 2021
Closes last comment at issue #611
@jaap-karssenberg
Copy link
Member

@aqeeliz thanks, that helped finding the issue. Just committed a fix.

Any further discussion of similar behavior, please start a new ticket.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants