fix(keyboard) do not deassign the textarea on OK or CANCEL click

This commit is contained in:
Gabor Kiss-Vamosi
2021-05-17 20:22:01 +02:00
parent 9d3d24202c
commit d505429dd8
2 changed files with 1 additions and 7 deletions

View File

@@ -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));
}
}

View File

@@ -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;
}