Fixed bug where focus does not follow the tab being switched