Scrollbar jump on previous/next slide click in Chrome
See original GitHub issueHi there,
First off, thanks for slick, and all your work on it. It’s really terrific, and I use it frequently.
After updating to 1.5.6
, it seems that clicking either the “Previous” or “Next” buttons causes the scrollbar to jump in Chrome (43). Here is a codepen test using the current version, and here is a test using version 1.5.5
. This does not appear to be an issue on either Firefox or Safari (I have not tested IE).
(Setting accessibility: false
corrects this behavior, but that’s obviously not ideal. The work done on https://github.com/kenwheeler/slick/pull/1467 is super helpful, and I am all for making slick more accessible.)
My question is, is this the desired behavior? If it is, I’ll close the issue. If not, I’m happy to submit a PR, but I don’t want to interfere with the accessibility work that’s been done.
Thanks again.
Issue Analytics
- State:
- Created 8 years ago
- Comments:20 (7 by maintainers)
Top GitHub Comments
+1 getting this too Google Chrome Version 44.0.2403.130 m
Mitigation
Interesting. I’m pretty sure this is related to tab focus from #1467. It looks like when the slider height is larger than the window height, the browser jumps to the top of the focused element.
If you set accessibility to false (example) it wont do that, but that’s an unfortunate decision to have to make.
I’m pretty sure that the “focus jump” will only happen when a user clicks a nav element; I tested with auto play, and if I was scrolled way down the page, it wouldn’t jump when it scrolled. So, I guess I’m curious what the use case is for a slider that’s larger than the window height, where this would be an issue.
@msrafi @simeydotme what do you think? I was looking around to see if there’s a way to control the behavior, but the options I’m seeing don’t look very smooth.
Thanks!
EDIT: Zoiks, I didn’t read the first initial issue very closely–said everything I just did sorry for the redundancy :p