summaryrefslogtreecommitdiff
path: root/indra/newview/llnearbychat.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llnearbychat.cpp')
-rw-r--r--indra/newview/llnearbychat.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/indra/newview/llnearbychat.cpp b/indra/newview/llnearbychat.cpp
index b96b486868..e0778afd86 100644
--- a/indra/newview/llnearbychat.cpp
+++ b/indra/newview/llnearbychat.cpp
@@ -271,11 +271,31 @@ void LLNearbyChat::removeScreenChat()
}
}
+void LLNearbyChat::setFocus(BOOL focusFlag)
+{
+ LLTransientDockableFloater::setFocus(focusFlag);
+
+ BOOL is_minimized = focusFlag && isChatMultiTab()
+ ? LLIMFloaterContainer::getInstance()->isMinimized()
+ : !focusFlag;
+
+ //Redirect focus to input editor
+ if (!is_minimized && mChatHistory && mInputEditor)
+ {
+ //prevent stealing focus when opening a background IM tab (EXT-5387, checking focus for EXT-6781)
+ if (!isChatMultiTab() || hasFocus())
+ {
+ mInputEditor->setFocus(TRUE);
+ }
+ }
+}
+
void LLNearbyChat::setVisible(BOOL visible)
{
if(visible)
{
removeScreenChat();
+ setFocus(TRUE);
}
LLIMConversation::setVisible(visible);