List automatically scroll to end when delete top_layer object
What MCU/Processor/Board and compiler are you using?
Linux PC simulator using SDL
What LVGL version are you using?
v8.3.10
What do you want to achieve?
List should not scroll automatically when top_layer object deleted
What have you tried so far?
Code to reproduce.
The below code will execute when cancel button pressed
lv_obj_add_event_cb(cancel_btn, top_layer_close_event_cb, LV_EVENT_CLICKED, text_popup_scr);
static void top_layer_close_event_cb(lv_event_t *e)
{
lv_event_code_t code = lv_event_get_code(e);
lv_obj_t *top_layer_scr = lv_event_get_user_data(e);
if (LV_EVENT_CLICKED == code)
{
lv_obj_clear_flag(lv_layer_top(), LV_OBJ_FLAG_CLICKABLE);
lv_obj_set_style_bg_opa(lv_layer_top(), LV_OPA_TRANSP, 0);
lv_obj_del(top_layer_scr);
lv_obj_del(kb);
kb = NULL;
}
}
After pressing Cancel Button