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

clickOnTrack should jump in chunks of just under the height of the viewport #15

Closed
vitch opened this issue Sep 22, 2010 · 3 comments
Closed

Comments

@vitch
Copy link
Owner

vitch commented Sep 22, 2010

This seems to be how native scrollbars behave. So you can easily click once on the track and it will jump down a page and you can carry on reading from where you had got up to.

@aivopaas
Copy link
Contributor

aivopaas commented Dec 7, 2010

This is fixed in my pull request.

@vitch
Copy link
Owner Author

vitch commented Jan 24, 2011

Pulled in aivopaas's changes... However, I'm still not sure that the behaviour is the same as with a native scrollbar. It currently scrolls a percentage of the height of the viewport when you click on the track. You can set scrollPagePercent to set this percentage. However, the native implementation seems to scroll "100% minus one line height" regardless of the height of the viewport... I'll look into implementing this alternative behaviour as soon as I have a chance...

@aivopaas
Copy link
Contributor

It depends on the browser. On Chrome, it actually does scroll about 80% of the container's height. So, when you have 5 lines visible, it sure does scroll 1 line less than viewport, but having tested with higher containers, it leaves more lines of old content visible.
Firefox seems to be on the "one old line" side. So there are at least 2 different native implementations. I like when there's a little more than a single line lef so you don't have to read exactly to the bottom.
And of course, I have nothing against making it configureable.

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