Set focus in all necessary ways, not just the keyboard alone, when tabs are changed by alt-arrows
This commit is contained in:
@@ -188,9 +188,14 @@ void LLFloaterChat::handleVisibilityChange(BOOL new_visibility)
|
|||||||
void LLFloaterChat::onFocusReceived()
|
void LLFloaterChat::onFocusReceived()
|
||||||
{
|
{
|
||||||
LLView* chat_editor = getChildView("Chat Editor");
|
LLView* chat_editor = getChildView("Chat Editor");
|
||||||
if (childIsVisible("Chat Editor"))
|
if (getVisible() && childIsVisible("Chat Editor"))
|
||||||
|
{
|
||||||
gFocusMgr.setKeyboardFocus(chat_editor);
|
gFocusMgr.setKeyboardFocus(chat_editor);
|
||||||
|
|
||||||
|
LLUICtrl * ctrl = static_cast<LLUICtrl*>(chat_editor);
|
||||||
|
ctrl->setFocus(TRUE);
|
||||||
|
}
|
||||||
|
|
||||||
LLFloater::onFocusReceived();
|
LLFloater::onFocusReceived();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -747,9 +752,13 @@ void LLFloaterChat::hide(LLFloater* instance, const LLSD& key)
|
|||||||
BOOL LLFloaterChat::focusFirstItem(BOOL prefer_text_fields, BOOL focus_flash )
|
BOOL LLFloaterChat::focusFirstItem(BOOL prefer_text_fields, BOOL focus_flash )
|
||||||
{
|
{
|
||||||
LLView* chat_editor = getChildView("Chat Editor");
|
LLView* chat_editor = getChildView("Chat Editor");
|
||||||
if (childIsVisible("Chat Editor"))
|
if (getVisible() && childIsVisible("Chat Editor"))
|
||||||
{
|
{
|
||||||
gFocusMgr.setKeyboardFocus(chat_editor);
|
gFocusMgr.setKeyboardFocus(chat_editor);
|
||||||
|
|
||||||
|
LLUICtrl * ctrl = static_cast<LLUICtrl*>(chat_editor);
|
||||||
|
ctrl->setFocus(TRUE);
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -2609,9 +2609,13 @@ const bool LLFloaterIMPanel::isModerator(const LLUUID& speaker_id)
|
|||||||
BOOL LLFloaterIMPanel::focusFirstItem(BOOL prefer_text_fields, BOOL focus_flash )
|
BOOL LLFloaterIMPanel::focusFirstItem(BOOL prefer_text_fields, BOOL focus_flash )
|
||||||
{
|
{
|
||||||
LLView* chat_editor = getChildView("chat_editor");
|
LLView* chat_editor = getChildView("chat_editor");
|
||||||
if (childIsVisible("chat_editor"))
|
if (getVisible() && childIsVisible("chat_editor"))
|
||||||
{
|
{
|
||||||
gFocusMgr.setKeyboardFocus(chat_editor);
|
gFocusMgr.setKeyboardFocus(chat_editor);
|
||||||
|
|
||||||
|
LLUICtrl * ctrl = static_cast<LLUICtrl*>(chat_editor);
|
||||||
|
ctrl->setFocus(TRUE);
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2621,8 +2625,13 @@ BOOL LLFloaterIMPanel::focusFirstItem(BOOL prefer_text_fields, BOOL focus_flash
|
|||||||
void LLFloaterIMPanel::onFocusReceived()
|
void LLFloaterIMPanel::onFocusReceived()
|
||||||
{
|
{
|
||||||
LLView* chat_editor = getChildView("chat_editor");
|
LLView* chat_editor = getChildView("chat_editor");
|
||||||
if (childIsVisible("chat_editor"))
|
if (getVisible() && childIsVisible("chat_editor"))
|
||||||
|
{
|
||||||
gFocusMgr.setKeyboardFocus(chat_editor);
|
gFocusMgr.setKeyboardFocus(chat_editor);
|
||||||
|
|
||||||
|
LLUICtrl * ctrl = static_cast<LLUICtrl*>(chat_editor);
|
||||||
|
ctrl->setFocus(TRUE);
|
||||||
|
}
|
||||||
|
|
||||||
LLFloater::onFocusReceived();
|
LLFloater::onFocusReceived();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user