From c74f4656fc500cb362338008e546991763e6e055 Mon Sep 17 00:00:00 2001 From: Themba Dube Date: Fri, 14 Dec 2018 16:32:22 -0500 Subject: [PATCH 1/2] Fix OK and close button symbols appearing in text area --- lv_objx/lv_kb.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lv_objx/lv_kb.c b/lv_objx/lv_kb.c index 7f1fb003c..d0e3cd5ac 100644 --- a/lv_objx/lv_kb.c +++ b/lv_objx/lv_kb.c @@ -430,6 +430,9 @@ static lv_res_t lv_kb_def_action(lv_obj_t * kb, const char * txt) if(res != LV_RES_OK) return res; /*The keyboard might be deleted in the actions*/ + /*If it's the OK or Close button do nothing */ + if((strcmp(txt, SYMBOL_OK) == 0) || (strcmp(txt, SYMBOL_CLOSE) == 0)) return LV_RES_OK; + /*Add the characters to the text area if set*/ if(ext->ta == NULL) return res; From 52ffa29ebe3985bedff16f6afdeed5ff7b4769b1 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Sat, 15 Dec 2018 00:11:28 +0100 Subject: [PATCH 2/2] lv_kb: bugfix update --- lv_objx/lv_kb.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lv_objx/lv_kb.c b/lv_objx/lv_kb.c index d0e3cd5ac..c90ab27ad 100644 --- a/lv_objx/lv_kb.c +++ b/lv_objx/lv_kb.c @@ -419,20 +419,18 @@ static lv_res_t lv_kb_def_action(lv_obj_t * kb, const char * txt) lv_kb_set_ta(kb, NULL); /*De-assign the text area to hide it cursor if needed*/ lv_obj_del(kb); } - return LV_RES_INV; + return res; } else if(strcmp(txt, SYMBOL_OK) == 0) { if(ext->ok_action) res = ext->ok_action(kb); else { lv_kb_set_ta(kb, NULL); /*De-assign the text area to hide it cursor if needed*/ res = lv_obj_del(kb); } + return res; } if(res != LV_RES_OK) return res; /*The keyboard might be deleted in the actions*/ - /*If it's the OK or Close button do nothing */ - if((strcmp(txt, SYMBOL_OK) == 0) || (strcmp(txt, SYMBOL_CLOSE) == 0)) return LV_RES_OK; - /*Add the characters to the text area if set*/ if(ext->ta == NULL) return res;