114960 r=bhuvan sr=mscott. Select the search string when the focus is on the search input field.

This commit is contained in:
naving%netscape.com 2002-02-12 21:48:29 +00:00
parent 1da50ef5df
commit 49c1fea165
2 changed files with 8 additions and 2 deletions

View File

@ -1487,7 +1487,7 @@ Rights Reserved.
<hbox id="searchBox" persist="collapsed" align="center">
<label id="searchCriteria" value="&SearchSubjectOrSender.label;"/>
<textbox id="searchInput" flex="1" oninput="onSearchInput(event);"/>
<textbox id="searchInput" flex="1" onfocus="searchInputFocus();" oninput="onSearchInput(event);"/>
<button id="clearButton" label="&clearButton.label;" disabled="true" tooltiptext="&clearButton.tooltip;" oncommand="onClearSearch();" accesskey="&clearButton.accesskey;"/>
<button id="advancedButton" label="&advancedButton.label;" tooltiptext="&advancedButton.tooltip;" oncommand="onAdvancedSearch();"/>
</hbox>

View File

@ -80,7 +80,6 @@ function getDocumentElements()
{
gSearchBundle = document.getElementById("bundle_search");
gStatusBar = document.getElementById('statusbar-icon');
gSearchInput = document.getElementById('searchInput');
gSearchCriteria =document.getElementById('searchCriteria');
gClearButton = document.getElementById('clearButton');
}
@ -234,3 +233,10 @@ function disableQuickSearchClearButton()
if (gClearButton)
gClearButton.setAttribute("disabled", true); //going out of search disable clear button
}
function searchInputFocus()
{
var searchInput = GetSearchInput();
if (searchInput.value)
searchInput.select();
}