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

G doesn't go to bottom of long list of items #20

Open
folofjc opened this issue Feb 28, 2022 · 4 comments
Open

G doesn't go to bottom of long list of items #20

folofjc opened this issue Feb 28, 2022 · 4 comments

Comments

@folofjc
Copy link

folofjc commented Feb 28, 2022

I have a page with a very long list of items that is longer than one page. G does not go to the bottom. It doesn't go to the bottom of the page, either. GG does not either. However, if I do G, then wait till it jumps, then G again, then it will go to the bottom.

@Wojnach
Copy link
Owner

Wojnach commented Mar 2, 2022

Yeah this is a limitation I ran into back when It was written. I haven't figured out a workaround for it yet. I tried a bunch of different approaches but I ended up with new problems down the line when I did that.

The main problem is that the items off screen aren't always focusable. You can move to them but most of the time you lose cursor focus. The current approch is to move to the bottommost focusable item and then collapse the rest of the items to make new items appear. So If you want to get to the bottom of a long list you end up spamming GG.

I'll have another look to see if I can figure something out. Maybe we can fix it with some Zoom-in/out black magic.

@folofjc
Copy link
Author

folofjc commented Mar 2, 2022

Okay, I figured there was something like this. This one is definitely low priority, since spamming GG is not that big of a deal.

@akak0000
Copy link

akak0000 commented Jan 8, 2023

@Wojnach Also would love a fix for this if you think of anything. Thanks!

@akak0000
Copy link

akak0000 commented Jan 8, 2023

@Wojnach Maybe you could use a recursive setTimeout so when "G" is pressed, it goes to the current bottom, and if you detect that there are more unrendered elements, schedule a setTimeout in 0 seconds to do the same thing again, in order to give the browser time to render and return control to the javascript and deliver another "G". Does that make sense?

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