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

Focus sometimes jumps to bottom of screen #1057

Open
ayoungethan opened this issue Apr 23, 2020 · 10 comments
Open

Focus sometimes jumps to bottom of screen #1057

ayoungethan opened this issue Apr 23, 2020 · 10 comments

Comments

@ayoungethan
Copy link

ayoungethan commented Apr 23, 2020

I am not sure about the conditions for this issue. But sometimes when I switch between tabs or I switch back to Zim from work in another program window, my first click in the composition window correctly places the cursor but then triggers a very quick and confusing scroll down to the bottom of the screen, as if somehow by clicking on the text I had also triggered a ctrl+end, except the cursor itself stays where I first clicked. If I start typing, the window focus jumps back to the cursor location up higher.

This is a wonderful program that perfectly suits my writing workflow, thank you! (also I used this before I met my partner, but came to understand the meaning because she was a big invader zim fan and new immediately what "invade your desktop" meant!)

@ayoungethan
Copy link
Author

ayoungethan commented Apr 23, 2020

This occurs on $ uname -a
Linux pop-os-darterpro 5.3.0-7648-generic #41~1586789791~19.10~9593806-Ubuntu SMP Mon Apr 13 17:50:40 UTC x86_64 x86_64 x86_64 GNU/Linux

Pop!_OS 19.10

@giovannijunior
Copy link

giovannijunior commented May 7, 2021

+1. This is one reason I'm feeling tempted to switch back to old versions like 0.69.

Steps to reproduce: using Ctrl+C, copy a lot of text from one page to another that also has a lot of text. Contrary to what happened in older versions, focus doesn't initially follow to the end of the copied text. Instead, it waits until you click the page, then jumps to the end (that is the wildly annoying part). If you start to type, then it goes back to the beginning of the pasted text.

Little bugs aside, congratulations on maintaining such a wonderful tool! I've been using it for years and it is really a joy to find software that sticks to its purpose and doesn't get worse with time.

@jaap-karssenberg
Copy link
Member

jaap-karssenberg commented Jun 9, 2021 via email

@ayoungethan
Copy link
Author

ayoungethan commented Jun 10, 2021 via email

@giovannijunior
Copy link

Using Windows 10, I could consistently reproduce the problem on Zim 0.73.4 with the following steps:

  • copy more than 500 lines of text from somewhere (the length of each line is not important)
  • create a new page on Zim
  • paste the text on the new page twice or more (I used Ctrl+V)

When I first paste the text, the scrollbar shows that I am at the end of the document. When I paste it the second or third time, the scrollbar doesn't follow to the end anymore. Then:

  • click the page text only once (focus appears to jump to the end)
  • type any character (focus jumps back to the beginning of the last copied chunk)

Combinations of these jumps occur in a seemingly random way when navigating/copying text/working on pages with hundreds of lines, but it is actually hard to reproduce it or point to a possible cause.

@vossenjp
Copy link

This is infuriating, and happens to me ALL the time. There are a bunch of rendering/jumping symptoms that I suspect are all the same root cause bug, but they are hard to consistently reproduce. Also called "stutter" and "display jerk" in other reports.

Another way to reproduce an issue to to paste a long URL (2-3 screen lines) into a bullet list. On the next mouse click, then Zim screen will jump to the right, thus placing the link under the mouse and generating an unwanted browser launch. Shift-CTRL-Up Arrow scrolls the screen back to the left. This happens to me 3-5 times per day when I paste long (extremely ugly) Jira URLs into my $WORK notes.

I think is this related to #727, #1276. And I think the root cause is related to incorrect screen geometry calculations that fail to take into account different font sizes, screen/display geometry, or something subtle and highly variable. It seems to happen more when pages have a large number of checkboxes and maybe bullets. Most of my pages are mostly those 2 things, with some headers.

@satychary
Copy link

Hi, I wanted to chime in with a 'me too'. PLEASE FIX THIS!!!

vossenjp calls it 'infuriating' - I call it 'dreadful' - I am actually FEARFUL of opening a page, EXPECTING this nasty bug to show up.

The LOSS OF CONTROL is what is horrible - clicking somewhere to edit, INSTEAD makes the content scroll to some random part of the page instead.

Zim is an amazing program overall. It's a shame that such a bug totally ruins the nice experience of using it. At times, I end up wanting to edit the raw text file rather than putting up with this bug.

@sojusnik
Copy link
Contributor

Same here! I feel with you! It's the most annoying thing I experience with Zim at the moment. Since I have lots of longer pages, I encounter it all the time.

Would really appreciate if we could collectively somehow solve this issue as soon as possible. Maybe one part of us could try to focus on reproducing it and documenting the circumstances when it appears and the other to look for a solution code-wise?

Here are some issues that seem to be relevant:
#92
#770
#611
#1276

@satychary
Copy link

@sojusnik - this is a weird workaround - maybe it can be a clue to fixing (not sure): right after navigating to a page that displays errant scrolling, do this - press Enter to create a blank line at the top (since the cursor is at the very top) - and THEN scroll down to where the 'real' edit needs to happen, click - NO errant scrolling :) Next time, do backspace/delete to remove that top blank line, keep alternating during visits. Annoying to need to do this, but less so than the jump :)

@sojusnik
Copy link
Contributor

this is a weird workaround

It is indeed :)

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