SL-20521 Focus does not move to the Nearby Chat field

master
Alexander Gavriliuk 2023-11-10 01:15:27 +01:00 committed by Guru
parent 1e7643eea5
commit 88b15ff62c
1 changed files with 7 additions and 6 deletions

View File

@ -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)
{