1
0
mirror of https://github.com/taigrr/nats.docs synced 2025-01-18 04:03:23 -08:00

Merge pull request #33 from nats-io/enter_blur

Force blur event on enter in search field, which will update the URI
This commit is contained in:
Ginger Collison 2019-06-19 09:32:23 -05:00 committed by GitHub
commit 3fa0acd53a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -90,6 +90,16 @@
window.gitbook.events.bind("page.change", function () {
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() {