Hide sidebar when it's not visible.