ngSticky
ngSticky copied to clipboard
Media Query not Actually Turning Off Sticky Behaviour
When using the 'media-query' attribute as described in the docs the sticky behaviour of the element does not stay off when the query matches. Instead, the 'isSticking' flag toggles on each scroll event. The result is that the sticky behaviour gets turned on and off and causes the scroll to jump back to the top of the page.
Try making the changes linked to above, @pbtura.
It works great for me if I change the first conditional in checkIfShouldStick()
to:
if ($scope.disabled === true || mediaQueryMatches ()) {
if(isSticking) unStickElement ();
return false;
}
+1