mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-27 06:43:32 +00:00
114960 r=bhuvan sr=mscott. Select the search string when the focus is on the search input field.
This commit is contained in:
parent
1da50ef5df
commit
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();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user