Allow enter to select items from combobox's list (#7351)
authorRob Blanckaert <basicer@basicer.com>
Sat, 28 Jul 2018 10:58:16 +0000 (03:58 -0700)
committerSmallJoker <SmallJoker@users.noreply.github.com>
Sat, 28 Jul 2018 10:58:16 +0000 (12:58 +0200)
src/gui/guiFormSpecMenu.cpp

index e522769f761c8211056f1a52c340039a65605589..82210c5916aa36803a3caaef11c57b80f617d44a 100644 (file)
@@ -2981,7 +2981,9 @@ bool GUIFormSpecMenu::preprocessEvent(const SEvent& event)
                        gui::IGUIElement *focused = Environment->getFocus();
                        if (focused && isMyChild(focused) &&
                                        (focused->getType() == gui::EGUIET_LIST_BOX ||
-                                        focused->getType() == gui::EGUIET_CHECK_BOX)) {
+                                       focused->getType() == gui::EGUIET_CHECK_BOX) &&
+                                       (focused->getParent()->getType() != gui::EGUIET_COMBO_BOX ||
+                                       event.KeyInput.Key != KEY_RETURN)) {
                                OnEvent(event);
                                return true;
                        }