From 2b44c8919f7e0ed58c7ae1ee782d8ff419382c03 Mon Sep 17 00:00:00 2001 From: Andrew Productengine Date: Thu, 30 Dec 2010 20:18:00 +0200 Subject: STORM-823 FIXED Fixed Tab Key not working properly in floaters. Bug was caused by not fiding focus root in LLUICtrl::findRootMostFocusRoot() when tab was pressed in floaters. When it was not found, LLPanel::handleKeyHere() didn't move focus to the next control. Floaters had erroneous behaviour because of focus_root xml param: though value of focus root was set with setFocusRoot() in floater's constructor , later it was overwritten in LLFloater::initFloaterXML() with value from xml again. This problem was introduced in af49c237b0f9 - there focus root was moved to xml. - To fix the problem, setFocusRoot() call was added after initFromParams() in LLFloater::initFloaterXML() to set proper value of focus root after overwriting it from xml. The drawback of the fix is that focus_root param is ignored by floaters and its value is determined depending on chrome, as it did before but the only other way to fix this problem would be to set the param in xml manually for each existing floater, and do it for each new floater added to viewer. --- indra/llui/llfloater.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'indra/llui') diff --git a/indra/llui/llfloater.cpp b/indra/llui/llfloater.cpp index 1265733bf5..d30697e178 100644 --- a/indra/llui/llfloater.cpp +++ b/indra/llui/llfloater.cpp @@ -2910,7 +2910,9 @@ bool LLFloater::initFloaterXML(LLXMLNodePtr node, LLView *parent, const std::str params.from_xui = true; applyXUILayout(params, parent); initFromParams(params); - + // chrome floaters don't take focus at all + setFocusRoot(!getIsChrome()); + initFloater(params); LLMultiFloater* last_host = LLFloater::getFloaterHost(); -- cgit v1.2.3