FIRE-6651: Modal alert toasts don't restore focus properly
LLFloater is a focus root and in case of a LLFloater hosted inside an LLMultiFloater, the floater itself is erroneously stored as the previously focused view. So an additional check is required to make sure we do not store the LLFloater, but its hosting LLMultiFloater as focus root.meow-7.2.2
parent
046d83730e
commit
51d9939b72
|
|
@ -73,7 +73,10 @@ LLToastAlertPanel::LLToastAlertPanel( LLNotificationPtr notification, bool modal
|
|||
LLView* current_selection = dynamic_cast<LLView*>(gFocusMgr.getKeyboardFocus());
|
||||
while(current_selection)
|
||||
{
|
||||
if (current_selection->isFocusRoot())
|
||||
// <FS:Ansariel> FIRE-6651: Modal alert toasts don't restore focus properly
|
||||
//if (current_selection->isFocusRoot())
|
||||
if (current_selection->isFocusRoot() && (!dynamic_cast<LLFloater*>(current_selection) || !dynamic_cast<LLFloater*>(current_selection)->getHost()))
|
||||
// </FS:Ansariel>
|
||||
{
|
||||
mPreviouslyFocusedView = current_selection->getHandle();
|
||||
break;
|
||||
|
|
@ -450,7 +453,10 @@ LLToastAlertPanel::~LLToastAlertPanel()
|
|||
LLView* current_selection = dynamic_cast<LLView*>(gFocusMgr.getKeyboardFocus());
|
||||
while(current_selection)
|
||||
{
|
||||
if (current_selection->isFocusRoot())
|
||||
// <FS:Ansariel> FIRE-6651: Modal alert toasts don't restore focus properly
|
||||
//if (current_selection->isFocusRoot())
|
||||
if (current_selection->isFocusRoot() && (!dynamic_cast<LLFloater*>(current_selection) || !dynamic_cast<LLFloater*>(current_selection)->getHost()))
|
||||
// </FS:Ansariel>
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue