From 7c893277a9d22ea6f825b608a71d42d2a1cb8afb Mon Sep 17 00:00:00 2001 From: Lou Huang Date: Thu, 5 Dec 2013 22:07:33 -0800 Subject: [PATCH] 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 | 1 + 1 file changed, 1 insertion(+) diff --git a/js/foundation/foundation.topbar.js b/js/foundation/foundation.topbar.js index 170892fc9..8db9ea1da 100644 --- a/js/foundation/foundation.topbar.js +++ b/js/foundation/foundation.topbar.js @@ -121,6 +121,7 @@ } else { topbar.addClass('fixed'); topbar.parent().addClass('expanded'); + $('body').addClass('f-topbar-fixed'); } } } -- 2.47.2