Invoke onTabSelected before tab changes