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

long list of checkboxes throw fixed sidebar into "jump loop" #218

Open
rvdb opened this issue Jun 23, 2016 · 3 comments
Open

long list of checkboxes throw fixed sidebar into "jump loop" #218

rvdb opened this issue Jun 23, 2016 · 3 comments

Comments

@rvdb
Copy link

rvdb commented Jun 23, 2016

Hi,

Does scrollToFixed have a problem with checkboxes? I have a long sidebar whose content overflows the available height, so the sidebar will have a scroll bar. I've noticed how the contents of that sidebar start to jump between the top and a scrolled down position, when:

  1. it has been fixed with scrollToFixed (I mean, after its position has been fixed with scrollToFixed)
  2. the contents of that sidebar is scrolled

After that, it keeps jumping up and down, as if it is stuck in a loop. I'm suspecting checkboxes could be the problem, since the sidebar behaves normally when I remove them (I mean, I can scroll it up and down when fixed).

To illustrate this, I've created a fiddle at http://jsfiddle.net/rvdb/Lr2czs4p/, based on the "position_with_floats" test file shipped with the scrollToFixed download.

Note: the problem only seems to occur with Firefox (47.0, I'm on Windows 7 Pro 64 bit); Opera and Chrome behave well. Yet, even when there's no "jump-loop" (by removing the checkboxes from my example), scrolling (either the fixed sidebar or the rest of the page) gets very slow (close to unresponsive) on Firefox, once the sidebar has been fixed with scrollToFixed. Are there known issues in Firefox with interference of other listeners for scrolling events?

Best,

Ron

@rvdb rvdb changed the title long list of checkboxes lock fixed sidebar into "jump loop" long list of checkboxes throw fixed sidebar into "jump loop" Jun 23, 2016
@rvdb
Copy link
Author

rvdb commented Jun 23, 2016

Ah, I've found a workaround: move the height and overflow properties from the sidebar div to the form inside it. See the updated JSFiddle at http://jsfiddle.net/rvdb/Lr2czs4p/1/.

This solves both the scroll jump loop, and the slow scrolling in Firefox.

@bigspotteddog
Copy link
Owner

Hi Ron,

Thanks for the workaround. I was not aware there was an issue with Firefox for what you describe.

I will put together a FAQ or something that refers to your workaround for this case.

Thanks again!

@rvdb
Copy link
Author

rvdb commented Jun 25, 2016

You're welcome (and thanks for the wonderful plugin!). I realize this might be a very specific problem in a very specific context; if you need more details or clarification, I'm happy to help you out.

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

2 participants