How to return to correct tab

Description

My problem is when user sets the time using keyboard it should return to correct tab (0) on Home screen (scr1) and it does not. So, everything in this callback function works except that. It starts from tab 1 to Time settings screen and instead going to tab 0 when finished it goes to tab 2, I have 3 tabs in a tabview on a Home screen.

What MCU/Processor/Board and compiler are you using?

I am using TFT simulator for MS Visual Studio.

What do you want to achieve?

I want to return to desired tab.

What have you tried so far?

I have tried different order of functions calls in last two lines and it did not help.

Code to reproduce

static void kb2_event_cb(lv_obj_t * keyboard, lv_event_t e)
{
	lv_keyboard_def_event_cb(kb2, e);
	if (e == LV_EVENT_APPLY) {
		const char * txt = lv_textarea_get_text(ta2);
		// Input check here
		strcpy(strTime, txt);
		#if EVENTS_DEBUG
			printf("KEYBOARD: LV_EVENT_APPLY\r\n");
			printf("Time: %s\r\n", strTime);
		#endif	
		lv_textarea_set_text(ta2, "");
		lv_label_set_text(lbl_time, strTime);
		lv_scr_load(scr1);
		lv_tabview_set_tab_act(tabview1, 0, LV_ANIM_OFF);
	}
}