зеркало из https://github.com/mozilla/gecko-dev.git
114960 r=bhuvan sr=mscott. Select the search string when the focus is on the search input field.
This commit is contained in:
Родитель
1da50ef5df
Коммит
49c1fea165
|
@ -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();
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче