diff options
Diffstat (limited to 'scene/gui')
-rw-r--r-- | scene/gui/popup_menu.cpp | 4 | ||||
-rw-r--r-- | scene/gui/text_edit.cpp | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/scene/gui/popup_menu.cpp b/scene/gui/popup_menu.cpp index e706053592..5afe2ed704 100644 --- a/scene/gui/popup_menu.cpp +++ b/scene/gui/popup_menu.cpp @@ -323,8 +323,10 @@ void PopupMenu::_input_event(const InputEvent &p_event) { invalidated_click=false; break; } - if (over<0 || items[over].separator || items[over].disabled) + if (over<0 || items[over].separator || items[over].disabled) { + hide(); break; //non-activable + } if (items[over].submenu!="") { diff --git a/scene/gui/text_edit.cpp b/scene/gui/text_edit.cpp index 4eef1ec9a9..be6c0d0a8b 100644 --- a/scene/gui/text_edit.cpp +++ b/scene/gui/text_edit.cpp @@ -709,7 +709,7 @@ void TextEdit::_notification(int p_what) { if (in_region==-1 && !in_keyword && is_char && !prev_is_char) { int to=j; - while(_is_text_char(str[to]) && to<str.length()) + while(to<str.length() && _is_text_char(str[to])) to++; uint32_t hash = String::hash(&str[j],to-j); |