mirror of https://github.com/zulip/zulip.git
Don't re-focus on the search box after ending the search.
(imported from commit 35bffb245ad9dc58b394a1c5228b32db4830f2bd)
This commit is contained in:
parent
9ec6b80019
commit
c1cc9f0742
|
@ -28,6 +28,7 @@ var globals =
|
|||
|
||||
// search.js
|
||||
+ ' search_button_handler something_is_highlighted update_highlight_on_narrow'
|
||||
+ ' initiate_search'
|
||||
|
||||
// setup.js
|
||||
+ ' loading_spinner templates'
|
||||
|
|
|
@ -114,7 +114,7 @@ function process_hotkey(code) {
|
|||
respond_to_message("personal");
|
||||
return process_hotkey;
|
||||
case 47: // '/': initiate search
|
||||
clear_search();
|
||||
initiate_search();
|
||||
return process_hotkey;
|
||||
case 63: // '?': Show keyboard shortcuts page
|
||||
$('#keyboard-shortcuts').modal('show');
|
||||
|
|
|
@ -92,9 +92,13 @@ function clear_search_cache() {
|
|||
cached_term = "";
|
||||
}
|
||||
|
||||
function initiate_search() {
|
||||
$('#search').val('').focus();
|
||||
}
|
||||
|
||||
function clear_search() {
|
||||
$('table tr').removeHighlight();
|
||||
$('#search').val('').focus();
|
||||
$('#search').val('');
|
||||
clear_search_cache();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue