diff options
author | Mike Antipov <mantipov@productengine.com> | 2010-01-05 16:38:18 +0200 |
---|---|---|
committer | Mike Antipov <mantipov@productengine.com> | 2010-01-05 16:38:18 +0200 |
commit | 4e518758d78b4b60d1b123eafc7df5ff4b8c44c6 (patch) | |
tree | 447c5ff02b65d55a059cba52e5f933abe3bdeed5 /indra/newview | |
parent | a2fb58b8dbf29d484888a1bdf5f685630e088628 (diff) |
Fixed major bug EXT-3852 ([BSI] Tabs in Tabbed Instant Messaging do not auto focus the text field when clicked)
-- the reason: LLTabContainer set focus to the first panel child;
-- fix: capture mouse with Input field to avoid processing of the input focus by LLTabContainer.
--HG--
branch : product-engine
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/llimfloater.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/indra/newview/llimfloater.cpp b/indra/newview/llimfloater.cpp index 259f629bdd..9bd5a8d5aa 100644 --- a/indra/newview/llimfloater.cpp +++ b/indra/newview/llimfloater.cpp @@ -120,6 +120,12 @@ void LLIMFloater::onFocusLost() void LLIMFloater::onFocusReceived() { LLIMModel::getInstance()->setActiveSessionID(mSessionID); + + // return focus to the input field when active tab in the multitab container is clicked. + if (isChatMultiTab() && mInputEditor) + { + mInputEditor->setFocus(TRUE); + } } // virtual @@ -618,6 +624,14 @@ void LLIMFloater::onInputEditorFocusReceived( LLFocusableElement* caller, void* //in disconnected state IM input editor should be disabled self->mInputEditor->setEnabled(!gDisconnected); } + + // when IM Floater is a part of the multitab container LLTabContainer set focus to the first + // child on tab button's mouse up. This leads input field lost focus. See EXT-3852. + if (isChatMultiTab()) + { + // So, let capture mouse tp prevent LLTabContainer set focus on the panel's first child. + gFocusMgr.setMouseCapture(self->mInputEditor); + } } // static |