deploy: b76db46076
This commit is contained in:
@@ -195,6 +195,7 @@ function SearchBox(name, resultsPath, extension)
|
||||
}
|
||||
else if (e.keyCode==27) // Escape out of the search field
|
||||
{
|
||||
e.stopPropagation();
|
||||
this.DOMSearchField().blur();
|
||||
this.DOMPopupSearchResultsWindow().style.display = 'none';
|
||||
this.DOMSearchClose().style.display = 'none';
|
||||
@@ -289,6 +290,7 @@ function SearchBox(name, resultsPath, extension)
|
||||
}
|
||||
else if (e.keyCode==13 || e.keyCode==27)
|
||||
{
|
||||
e.stopPropagation();
|
||||
this.OnSelectItem(this.searchIndex);
|
||||
this.CloseSelectionWindow();
|
||||
this.DOMSearchField().focus();
|
||||
@@ -670,6 +672,7 @@ function SearchResults(name)
|
||||
}
|
||||
else if (this.lastKey==27) // Escape
|
||||
{
|
||||
e.stopPropagation();
|
||||
searchBox.CloseResultsWindow();
|
||||
document.getElementById("MSearchField").focus();
|
||||
}
|
||||
@@ -713,6 +716,7 @@ function SearchResults(name)
|
||||
}
|
||||
else if (this.lastKey==27) // Escape
|
||||
{
|
||||
e.stopPropagation();
|
||||
searchBox.CloseResultsWindow();
|
||||
document.getElementById("MSearchField").focus();
|
||||
}
|
||||
@@ -806,6 +810,7 @@ function createResults(resultsPath)
|
||||
function init_search()
|
||||
{
|
||||
var results = document.getElementById("MSearchSelectWindow");
|
||||
results.tabIndex=0;
|
||||
for (var key in indexSectionLabels)
|
||||
{
|
||||
var link = document.createElement('a');
|
||||
@@ -816,5 +821,20 @@ function init_search()
|
||||
results.appendChild(link);
|
||||
}
|
||||
searchBox.OnSelectItem(0);
|
||||
|
||||
var input = document.getElementById("MSearchSelect");
|
||||
var searchSelectWindow = document.getElementById("MSearchSelectWindow");
|
||||
input.tabIndex=0;
|
||||
input.addEventListener("keydown", function(event) {
|
||||
if (event.keyCode==13 || event.keyCode==40) {
|
||||
event.preventDefault();
|
||||
if (searchSelectWindow.style.display == 'block') {
|
||||
searchBox.CloseSelectionWindow();
|
||||
} else {
|
||||
searchBox.OnSearchSelectShow();
|
||||
searchBox.DOMSearchSelectWindow().focus();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
/* @license-end */
|
||||
|
Reference in New Issue
Block a user