summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorAlexander Gavriliuk <alexandrgproductengine@lindenlab.com>2023-11-10 01:15:27 +0100
committerGuru <alexandrgproductengine@lindenlab.com>2023-11-10 03:35:39 +0100
commit88b15ff62c5225f48d60d5d49dafbd32417856c7 (patch)
treeaa5d59dfe47b56610f2922e48bead6ba7be1b60a /indra
parent1e7643eea5883db5b773db99b37440eb06b63e3e (diff)
SL-20521 Focus does not move to the Nearby Chat field
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llfloaterimsessiontab.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/indra/newview/llfloaterimsessiontab.cpp b/indra/newview/llfloaterimsessiontab.cpp
index 5804d8701b..fcfd47b365 100644
--- a/indra/newview/llfloaterimsessiontab.cpp
+++ b/indra/newview/llfloaterimsessiontab.cpp
@@ -454,14 +454,15 @@ void LLFloaterIMSessionTab::onInputEditorClicked()
void LLFloaterIMSessionTab::onEmojiRecentPanelToggleBtnClicked(LLFloaterIMSessionTab* self)
{
- bool restore_focus = (gFocusMgr.getLastKeyboardFocus() == self->mInputEditor);
+ bool show = !self->mEmojiRecentPanel->getVisible();
+ bool restore_focus = !show || (gFocusMgr.getLastKeyboardFocus() == self->mInputEditor);
- BOOL show = !self->mEmojiRecentPanel->getVisible();
- if (show)
- {
+ if (show)
+ {
self->initEmojiRecentPanel(!restore_focus);
- }
- self->mEmojiRecentPanel->setVisible(show);
+ }
+
+ self->mEmojiRecentPanel->setVisible(show ? TRUE : FALSE);
if (restore_focus)
{