-
-
Notifications
You must be signed in to change notification settings - Fork 78.9k
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
Affix position doesn't reset when scrolling back up #9342
Comments
this is an issue with your implementation.
try asking in the mailing list if you need help |
No, it isn't. If you look at the fiddle I linked, as well as the screenshot I provided, you'll note, as I described, that when you reach the bottom, the plugin adds a |
@fat Did you check the provided fiddle? It clearly shows that the affix plugin is setting |
After getting some time to investigate it more while taking a break from work, I've found that the bug is caused by the usage of jQuery's
You can read more about how jQuery's Since jQuery's |
@fat I can confirm that this issue exists, i'm not sure were the style attribute is getting set from in the JS but it is being set! Here's my example http://72.1.241.234/affix/ |
@ShaunR It's from the usage of jQuery's
|
i fixed your jsfiddle. http://jsfiddle.net/H9D4P/11/embedded/result/ like i said originally: you must provide a style for offset applies position relative if you don't apply |
@fat There is still an issue when you set See: http://jsfiddle.net/H9D4P/16/embedded/result/ Tested on OSX 10.9.1 in Firefox 26.0, Chrome 31.0.1650.63, Safari 7.0.1 |
@timodewinter Did you ever figure this out? I'm having the same issue. If you scroll all the way down and then back up again the affixed item just sits there until you scroll back to the top of the page. |
I to have the same problem when having .affix {top: 0; }. When changing to .affix { top: 1px; } it works. This problem appears in Chrome (Version 33.0.1750.146 m) and Firefox (26.0), not in IE 11 on Win 8. I initialize affix by: css: .affix-top { } |
fixed by this pr #12982 |
I too had the same problem and this snippet fixed the problem
|
Locking per #12982. |
Issue occurs when using a top and bottom offset and scrolling all the way down so that the Affix gets the
.affix-bottom
class and a style tag withposition:relative;
. When you scroll back up, it doesn't remove the style tag withposition:relative;
which thus overrides the.affix
class'sposition:fixed
and makes it snap to the top of the page instead of affixing smoothly like when scrolling downFiddle: http://jsfiddle.net/H9D4P/
Screenshot of the
style
tag overridingposition:fixed;
The text was updated successfully, but these errors were encountered: