зеркало из https://github.com/mozilla/gecko-dev.git
114960 r=racham sr=mscott. Select the search text upon issuing search from search bar(quick search)
This commit is contained in:
Родитель
470277e568
Коммит
9527f55f68
|
@ -1488,7 +1488,7 @@ Rights Reserved.
|
|||
|
||||
<hbox id="searchBox" persist="collapsed" align="center">
|
||||
<label id="searchCriteria" value="&SearchSubjectOrSender.label;"/>
|
||||
<textbox id="searchInput" flex="1" onfocus="searchInputFocus();" oninput="onSearchInput(event);"/>
|
||||
<textbox id="searchInput" flex="1" onfocus="this.select();" 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>
|
||||
|
|
|
@ -82,6 +82,7 @@ function getDocumentElements()
|
|||
gStatusBar = document.getElementById('statusbar-icon');
|
||||
gSearchCriteria =document.getElementById('searchCriteria');
|
||||
gClearButton = document.getElementById('clearButton');
|
||||
GetSearchInput();
|
||||
}
|
||||
|
||||
function addListeners()
|
||||
|
@ -129,8 +130,10 @@ function onEnterInSearchBar()
|
|||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
gSearchInput.select();
|
||||
gClearButton.setAttribute("disabled", false); //coming into search enable clear button
|
||||
|
||||
}
|
||||
|
||||
ClearThreadPaneSelection();
|
||||
ClearMessagePane();
|
||||
|
@ -233,10 +236,3 @@ 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();
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче