diff -r 4d9106153407 -r daa08c9b770f indra/llui/llfloater.cpp --- a/indra/llui/llfloater.cpp Thu Jun 21 16:44:04 2012 -0400 +++ b/indra/llui/llfloater.cpp Mon Jun 25 05:09:22 2012 +0200 @@ -748,6 +748,10 @@ dependee->setFocus(TRUE); } } + + // STORM-1879: since this floater has focus, treat the closeFloater- call + // like a click on the close-button, and close gear- and contextmenus + LLMenuGL::sMenuContainer->hideMenus(); } dirtyRect(); diff -r 4d9106153407 -r daa08c9b770f indra/llui/lltoggleablemenu.cpp --- a/indra/llui/lltoggleablemenu.cpp Thu Jun 21 16:44:04 2012 -0400 +++ b/indra/llui/lltoggleablemenu.cpp Mon Jun 25 05:09:22 2012 +0200 @@ -57,7 +57,9 @@ S32 x,y; LLUI::getMousePositionLocal(LLUI::getRootView(), &x, &y); - if (!curVisibilityIn && mButtonRect.pointInRect(x, y)) + // STORM-1879: also check MouseCapture to see if the button was really + // clicked (otherwise the VisibilityChange was triggered via keyboard shortcut) + if (!curVisibilityIn && mButtonRect.pointInRect(x, y) && gFocusMgr.getMouseCapture()) { mClosedByButtonClick = true; }