From 88b15ff62c5225f48d60d5d49dafbd32417856c7 Mon Sep 17 00:00:00 2001 From: Alexander Gavriliuk Date: Fri, 10 Nov 2023 01:15:27 +0100 Subject: SL-20521 Focus does not move to the Nearby Chat field --- indra/newview/llfloaterimsessiontab.cpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'indra') 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) { -- cgit v1.2.3