summaryrefslogtreecommitdiff
path: root/indra/llui
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llui')
-rw-r--r--indra/llui/llemojihelper.cpp5
-rw-r--r--indra/llui/llemojihelper.h2
2 files changed, 6 insertions, 1 deletions
diff --git a/indra/llui/llemojihelper.cpp b/indra/llui/llemojihelper.cpp
index d4c31ee986..54c801ab7b 100644
--- a/indra/llui/llemojihelper.cpp
+++ b/indra/llui/llemojihelper.cpp
@@ -98,6 +98,11 @@ void LLEmojiHelper::showHelper(LLUICtrl* hostctrl_p, S32 local_x, S32 local_y, c
void LLEmojiHelper::hideHelper(const LLUICtrl* ctrl_p)
{
+ if (ctrl_p && !isActive(ctrl_p))
+ {
+ return;
+ }
+
setHostCtrl(nullptr);
}
diff --git a/indra/llui/llemojihelper.h b/indra/llui/llemojihelper.h
index 7ed042fc5f..63f5c640c9 100644
--- a/indra/llui/llemojihelper.h
+++ b/indra/llui/llemojihelper.h
@@ -45,7 +45,7 @@ public:
bool isActive(const LLUICtrl* ctrl_p) const;
static bool isCursorInEmojiCode(const LLWString& wtext, S32 cursor_pos, S32* short_code_pos_p = nullptr);
void showHelper(LLUICtrl* hostctrl_p, S32 local_x, S32 local_y, const std::string& short_code, std::function<void(LLWString)> commit_cb);
- void hideHelper(const LLUICtrl* ctrl_p);
+ void hideHelper(const LLUICtrl* ctrl_p = nullptr);
// Eventing
bool handleKey(const LLUICtrl* ctrl_p, KEY key, MASK mask);