Disable space as search focus key

This commit is contained in:
Alex Shpak 2020-01-24 00:39:47 +01:00
parent dc7e2f0013
commit 83f6c3d475
2 changed files with 1 additions and 3 deletions

View file

@ -28,8 +28,6 @@
function isHotkey(character) { function isHotkey(character) {
const dataHotkeys = input.getAttribute('data-hotkeys') || ''; const dataHotkeys = input.getAttribute('data-hotkeys') || '';
const hotkeys = dataHotkeys.split(' ');
return dataHotkeys.indexOf(character) >= 0; return dataHotkeys.indexOf(character) >= 0;
} }

View file

@ -1,6 +1,6 @@
{{ if default true .Site.Params.BookSearch }} {{ if default true .Site.Params.BookSearch }}
<div class="book-search"> <div class="book-search">
<input type="text" id="book-search-input" placeholder="{{ i18n "Search" }}" aria-label="{{ i18n "Search" }}" maxlength="64" data-hotkeys="s /" /> <input type="text" id="book-search-input" placeholder="{{ i18n "Search" }}" aria-label="{{ i18n "Search" }}" maxlength="64" data-hotkeys="s/" />
<div class="book-search-spinner spinner hidden"></div> <div class="book-search-spinner spinner hidden"></div>
<ul id="book-search-results"></ul> <ul id="book-search-results"></ul>
</div> </div>