mirror of
https://github.com/taigrr/nats.docs
synced 2025-01-18 04:03:23 -08:00
Force blur event on enter in search field, which will update the URI
This commit is contained in:
parent
9566ae2cbc
commit
3c4cf56b45
@ -90,6 +90,16 @@
|
|||||||
window.gitbook.events.bind("page.change", function () {
|
window.gitbook.events.bind("page.change", function () {
|
||||||
pageChanged();
|
pageChanged();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
var searchInput = document.querySelector('#book-search-input input');
|
||||||
|
|
||||||
|
if (searchInput) {
|
||||||
|
searchInput.addEventListener('keyup', function(event) {
|
||||||
|
if (event.keyCode === 13) {
|
||||||
|
event.target.blur();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function pageChanged() {
|
function pageChanged() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user