Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Daniel CAZAL
co2
Commits
d55f68ef
Commit
d55f68ef
authored
Jul 20, 2018
by
Clément Damiens
Browse files
fix text search bar focus end keyup
parent
5587971d
Changes
1
Hide whitespace changes
Inline
Side-by-side
assets/js/default/search.js
View file @
d55f68ef
...
...
@@ -58,10 +58,9 @@ function initSearchInterface(){
activeTagsFilter
();
startSearch
(
0
,
indexStepInit
,
searchCallback
);
});
$
(
"
#main-search-bar, #main-search-xs-bar
"
).
keyup
(
function
(
e
){
$
(
"
#main-search-bar
"
).
keyup
(
function
(
e
){
$
(
"
#second-search-bar
"
).
val
(
$
(
this
).
val
());
$
(
"
.
main-search-bar
"
).
val
(
$
(
this
).
val
());
$
(
"
#
main-search-
xs-
bar
"
).
val
(
$
(
this
).
val
());
$
(
"
#input-search-map
"
).
val
(
$
(
this
).
val
());
if
(
e
.
keyCode
==
13
||
$
(
this
).
val
()
==
""
){
spinSearchAddon
(
true
);
...
...
@@ -73,10 +72,25 @@ function initSearchInterface(){
startSearch
(
0
,
indexStepInit
,
searchCallback
);
}
});
$
(
"
#main-search-bar, #main-search-xs-bar
"
).
change
(
function
(){
$
(
"
#main-search-xs-bar
"
).
keyup
(
function
(
e
){
$
(
"
#second-search-bar
"
).
val
(
$
(
this
).
val
());
$
(
"
.main-search-bar
"
).
val
(
$
(
this
).
val
());
$
(
"
#main-search-bar
"
).
val
(
$
(
this
).
val
());
$
(
"
#input-search-map
"
).
val
(
$
(
this
).
val
());
if
(
e
.
keyCode
==
13
||
$
(
this
).
val
()
==
""
){
spinSearchAddon
(
true
);
searchObject
.
page
=
0
;
searchObject
.
text
=
$
(
this
).
val
();
pageCount
=
true
;
searchObject
.
count
=
true
;
if
(
typeof
searchObject
.
ranges
!=
"
undefined
"
)
searchAllEngine
.
initSearch
();
startSearch
(
0
,
indexStepInit
,
searchCallback
);
}
});
/*$("#main-search-bar, #main-search-xs-bar").change(function(){
$("#second-search-bar").val($(this).val());
$(".main-search-bar").val($(this).val());
});*/
$
(
"
#second-search-bar
"
).
keyup
(
function
(
e
){
$
(
"
.main-search-bar
"
).
val
(
$
(
this
).
val
());
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment