Skip to content

Commit

Permalink
fix(dropdown) adjust the handling of keys sent to the dropdown
Browse files Browse the repository at this point in the history
  • Loading branch information
kisvegabor committed Aug 12, 2021
1 parent 55e8846 commit e41c507
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/widgets/lv_dropdown.c
Expand Up @@ -671,10 +671,10 @@ static void lv_dropdown_event(const lv_obj_class_t * class_p, lv_event_t * e)
lv_dropdown_close(obj);
}
else if(c == LV_KEY_ENTER) {
lv_indev_t * indev = lv_indev_get_act();
/*If there is no indev ENTER was sent manually so process it.
*If sent by an indev then LV_EVENT_RELEASED is also sent and process it there */
if(indev == NULL) {
/* Handle the ENTER key only if it was send by an other object.
* Do no process it if ENTER is sent by the dropdown becasue it's handled in LV_EVENT_RELEASED */
lv_obj_t * indev_obj = lv_indev_get_obj_act();
if(indev_obj != obj) {
res = btn_release_handler(obj);
if(res != LV_RES_OK) return;
}
Expand Down

0 comments on commit e41c507

Please sign in to comment.