summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaxim Nikolenko <maximnproductengine@lindenlab.com>2023-10-02 15:54:22 +0300
committerGitHub <noreply@github.com>2023-10-02 15:54:22 +0300
commit988278b8c380fc72df1001bb0e5bf38c0a1a655a (patch)
treebe17fadb339d01d7a84a79ea8767e677320425cd
parentf36f50462e226308424d57298aa29c4dccfef6e2 (diff)
SL-20358 restore focus after opening recent emoji panel
-rw-r--r--indra/newview/llfloaterimsessiontab.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/indra/newview/llfloaterimsessiontab.cpp b/indra/newview/llfloaterimsessiontab.cpp
index 7a0de78ac5..a44303f72c 100644
--- a/indra/newview/llfloaterimsessiontab.cpp
+++ b/indra/newview/llfloaterimsessiontab.cpp
@@ -453,12 +453,19 @@ void LLFloaterIMSessionTab::onInputEditorClicked()
void LLFloaterIMSessionTab::onEmojiRecentPanelToggleBtnClicked(LLFloaterIMSessionTab* self)
{
+ bool restore_focus = (gFocusMgr.getLastKeyboardFocus() == self->mInputEditor);
+
BOOL show = !self->mEmojiRecentPanel->getVisible();
if (show)
{
- self->initEmojiRecentPanel(true);
+ self->initEmojiRecentPanel(!restore_focus);
}
self->mEmojiRecentPanel->setVisible(show);
+
+ if (restore_focus)
+ {
+ self->mInputEditor->setFocus(true);
+ }
}
void LLFloaterIMSessionTab::onEmojiPickerToggleBtnClicked(LLFloaterIMSessionTab* self)