]> git.ipfire.org Git - thirdparty/foundation/foundation-sites.git/commit
Fix topbar behavior when scrolltop setting is false 3822/head
authorLou Huang <lou@codeforamerica.org>
Fri, 6 Dec 2013 06:07:33 +0000 (22:07 -0800)
committerLou Huang <lou@codeforamerica.org>
Fri, 6 Dec 2013 06:07:33 +0000 (22:07 -0800)
commit7c893277a9d22ea6f825b608a71d42d2a1cb8afb
treee66336f26c3f4296427e87fa5641d20f1b74e5e2
parent30e7c676c8eab3903067e3108633470e32c88f69
Fix topbar behavior when scrolltop setting is false

When a topbar's ```scrolltop``` setting is set to false, the expected behavior is that the page content below the dropdown should not move at all. The actual behavior is that when the page content has scrolled past the top, and the dropdown is displayed, then the page content will move upwards by an amount equal to the topbar's height. This is because the the class ```f-topbar-fixed``` is not being applied to the body when the dropdown is displayed. This is fixed in the commit here.

The ```f-topbar-fixed``` class does not need to be manually removed when the dropdown is closed, since ```self.update_sticky_positioning()``` will take care it.
js/foundation/foundation.topbar.js