summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Linden <none@none>2011-07-29 17:29:02 -0700
committerRichard Linden <none@none>2011-07-29 17:29:02 -0700
commitc7a2f5c4fba4ec8a782f96aa379b1372ed31a317 (patch)
tree201d685d02a38f810afc65b8d35face48a8f8496
parentfeddda6740f55c5e872be4b608d516e86e0c4182 (diff)
EXP-1057 FIX Cursor doesn't go to the input field on the Find Floater due to lack of window focus
also allow right clip to copy url from disabled address bar
-rw-r--r--indra/llui/llcombobox.cpp6
-rw-r--r--indra/newview/llfloaterwebcontent.cpp13
2 files changed, 15 insertions, 4 deletions
diff --git a/indra/llui/llcombobox.cpp b/indra/llui/llcombobox.cpp
index a4d1854bc8..cddda03faf 100644
--- a/indra/llui/llcombobox.cpp
+++ b/indra/llui/llcombobox.cpp
@@ -791,8 +791,10 @@ BOOL LLComboBox::handleKeyHere(KEY key, MASK mask)
return FALSE;
}
// if selection has changed, pop open list
- else if (mList->getLastSelectedItem() != last_selected_item ||
- (key == KEY_DOWN || key == KEY_UP) && !mList->isEmpty())
+ else if (mList->getLastSelectedItem() != last_selected_item
+ || ((key == KEY_DOWN || key == KEY_UP)
+ && mList->getCanSelect()
+ && !mList->isEmpty()))
{
showList();
}
diff --git a/indra/newview/llfloaterwebcontent.cpp b/indra/newview/llfloaterwebcontent.cpp
index 500ddc3bc1..03e90a3d27 100644
--- a/indra/newview/llfloaterwebcontent.cpp
+++ b/indra/newview/llfloaterwebcontent.cpp
@@ -223,12 +223,21 @@ void LLFloaterWebContent::open_media(const Params& p)
mWebBrowser->setHomePageUrl(p.url, "text/html");
mWebBrowser->setTarget(p.target);
mWebBrowser->navigateTo(p.url, "text/html");
-
+
set_current_url(p.url);
getChild<LLLayoutPanel>("status_bar")->setVisible(p.show_chrome);
getChild<LLLayoutPanel>("nav_controls")->setVisible(p.show_chrome);
- getChild<LLUICtrl>("address")->setEnabled(p.allow_address_entry && !p.trusted_content);
+ bool address_entry_enabled = p.allow_address_entry && !p.trusted_content;
+ // disable components of combo box so that we can still select and copy text from address bar (a disabled line editor still allows this, but not if its parent is disabled)
+ getChildView("address")->getChildView("Combo Text Entry")->setEnabled(address_entry_enabled);
+ getChildView("address")->getChildView("Combobox Button")->setEnabled(address_entry_enabled);
+ getChildView("address")->getChildView("ComboBox")->setEnabled(address_entry_enabled);
+
+ if (!address_entry_enabled)
+ {
+ mWebBrowser->setFocus(TRUE);
+ }
if (!p.show_chrome)
{