ensured that state change respects consequences

this is largely empirical, so there might be a better way

note that this also means the transition is less smooth because the
navigation becomes sticky only when it's about to disappear completely
(i.e. at its bottom) rather than when it starts disappearing (i.e. at
the top) - sad pandas