fix(keyboard) do not deassign the textarea on OK or CANCEL click
This commit is contained in:
@@ -52,10 +52,7 @@ static void ta_event_cb(lv_event_t * e)
|
||||
}
|
||||
|
||||
else if(code == LV_EVENT_READY) {
|
||||
const char * str = lv_event_get_param(e);
|
||||
if(str[0] == '\n') {
|
||||
LV_LOG_USER("Ready\n");
|
||||
}
|
||||
LV_LOG_USER("Ready, current text: %s", lv_textarea_get_text(ta));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -260,7 +260,6 @@ void lv_keyboard_def_event_cb(lv_event_t * e)
|
||||
res = lv_event_send(keyboard->ta, LV_EVENT_CANCEL, NULL);
|
||||
if(res != LV_RES_OK) return;
|
||||
}
|
||||
lv_keyboard_set_textarea(obj, NULL); /*De-assign the text area to hide it cursor if needed*/
|
||||
return;
|
||||
}
|
||||
else if(strcmp(txt, LV_SYMBOL_OK) == 0) {
|
||||
@@ -271,8 +270,6 @@ void lv_keyboard_def_event_cb(lv_event_t * e)
|
||||
res = lv_event_send(keyboard->ta, LV_EVENT_READY, NULL);
|
||||
if(res != LV_RES_OK) return;
|
||||
}
|
||||
|
||||
lv_keyboard_set_textarea(obj, NULL); /*De-assign the text area to hide it cursor if needed*/
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user