Skip to content

Commit a7b9026

Browse files
committed
fix focusout bug
1 parent 7bb795e commit a7b9026

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

docs/_templates/page.html

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,14 @@
2020
}
2121
});
2222
if (navigator.platform.indexOf('Mac') === -1) $('#search-shortcut-sidebar').html("^K"); // if OS isn't Mac change Visual indication of search field
23+
24+
// Show & hide seach input when focusin & focusout
2325
$('#search-input').focus(() => {
2426
$('#search-shortcut-sidebar').hide();
2527
});
28+
$('#search-input').focusout(() => {
29+
$('#search-shortcut-sidebar').show();
30+
})
2631
</script>
2732

2833
{% endblock %}

docs/_templates/search.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ <h1 id="search-documentation">{{ _('Search') }}</h1>
4949
<div class="row">
5050
<div class="input-group col-xl-8 mb-2">
5151
<input
52-
type="text" name="q" id="q"
52+
type="search" name="q" id="q"
5353
class="form-control"
5454
placeholder="Search the docs…"
5555
aria-labelledby="search-documentation" value="" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>

0 commit comments

Comments
 (0)