Handle collapsed sidebar when resizing