summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--MdeModulePkg/Universal/DisplayEngineDxe/FormDisplay.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/MdeModulePkg/Universal/DisplayEngineDxe/FormDisplay.c b/MdeModulePkg/Universal/DisplayEngineDxe/FormDisplay.c
index c2cffecbe9..316e2e3705 100644
--- a/MdeModulePkg/Universal/DisplayEngineDxe/FormDisplay.c
+++ b/MdeModulePkg/Universal/DisplayEngineDxe/FormDisplay.c
@@ -1050,12 +1050,8 @@ MoveToNextStatement (
UpdateOptionSkipLines (NextMenuOption);
}
- if (IsSelectable (NextMenuOption)) {
- break;
- }
-
//
- // In this case, still can't find the selectable menu,
+ // Check whether the menu is beyond current showing form,
// return the first one beyond the showing form.
//
if ((UINTN) Distance + NextMenuOption->Skip > GapToTop) {
@@ -1065,6 +1061,13 @@ MoveToNextStatement (
break;
}
+ //
+ // return the selectable menu in the showing form.
+ //
+ if (IsSelectable (NextMenuOption)) {
+ break;
+ }
+
Distance += NextMenuOption->Skip;
//