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
Родитель 1da50ef5df
Коммит 49c1fea165
2 изменённых файлов: 8 добавлений и 2 удалений

Просмотреть файл

@ -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>

Просмотреть файл

@ -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();
}