GP-1217 - fixed stack trace when using keyboard shortcuts in a combo box

popup menu
This commit is contained in:
dragonmacher 2021-08-18 14:12:36 -04:00
parent 366d458407
commit c6404f4dc6

View File

@ -169,6 +169,9 @@ abstract class MenuKeyHandler {
}
int itemCount = getItemCount(popup);
if (itemCount == 0) {
return -1;
}
// handle wrapping around to the top again
int updatedOffset = offset >= itemCount ? offset % itemCount : offset;