IDEMPIERE-6146 Recently access menu item: minor refresh refinement (#2370)
* IDEMPIERE-6146 Recently access menu item: minor refresh refinement * IDEMPIERE-6146 Recently access menu item: minor refresh refinement - Fix handling of "enter" key
This commit is contained in:
parent
66819ecf79
commit
62c86f82c3
|
|
@ -668,7 +668,8 @@ public class MenuSearchController implements EventListener<Event>{
|
|||
int count = listbox.getItemCount();
|
||||
for(int i = 0; i < count; i++) {
|
||||
ListItem item = listbox.getItemAtIndex(i);
|
||||
String label = item.getLabel();
|
||||
MenuItem menuItem = item.getValue();
|
||||
String label = menuItem.getLabel();
|
||||
if (Util.isEmpty(label)) continue;
|
||||
if (label.equalsIgnoreCase(text)) {
|
||||
exact = item;
|
||||
|
|
@ -678,11 +679,13 @@ public class MenuSearchController implements EventListener<Event>{
|
|||
}
|
||||
}
|
||||
if (exact != null) {
|
||||
textbox.setText(exact.getLabel());
|
||||
MenuItem menuItem = exact.getValue();
|
||||
textbox.setText(menuItem.getLabel());
|
||||
onSelect(exact, false);
|
||||
return true;
|
||||
} else if (firstStart != null) {
|
||||
textbox.setText(firstStart.getLabel());
|
||||
MenuItem menuItem = firstStart.getValue();
|
||||
textbox.setText(menuItem.getLabel());
|
||||
onSelect(firstStart, false);
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue