Fix setSelectedIndex when topBarAutoHide.