Compare commits

..

No commits in common. "8398670530fd34f648d32f92240630ad5f012c5a" and "e8b653737cf50c2d4a73654ea880aace1382f255" have entirely different histories.

3 changed files with 1 additions and 40 deletions

View file

@ -56,7 +56,7 @@
</div>
<div class="panel-body">
<div
v-if="!Object.values(loading).includes(false) && !hasAtLeastOneResult"
v-if="!loadedInitially"
class="text-center loading-icon"
>
<FAIcon

View file

@ -10,12 +10,6 @@ library.add(
)
const SearchBar = {
mounted () {
window.addEventListener('keydown', this.autoFocus)
},
beforeDestroy () {
window.removeEventListener('keydown', this.autoFocus)
},
data: () => ({
searchTerm: undefined,
hidden: true,
@ -42,36 +36,6 @@ const SearchBar = {
this.$refs.searchInput.focus()
}
})
},
autoFocus (event) {
if (
event.target.tagName !== 'BODY' ||
event.altKey ||
event.ctrlKey ||
event.isComposing ||
event.metaKey ||
event.repeat ||
event.shiftKey
) {
return
}
if (event.key === '/') {
if (this.hidden) {
this.toggleHidden()
} else {
this.$refs.searchInput.focus()
}
event.preventDefault()
} else if (event.key === 'Escape') {
if (!this.hidden) {
this.toggleHidden()
}
event.preventDefault()
}
},
blur () {
this.$refs.searchInput.blur()
}
}
}

View file

@ -27,9 +27,6 @@
@keydown.enter="
$event.isComposing || $event.keyCode === 229 || find(searchTerm)
"
@keydown.escape="
$event.isComposing || blur()
"
>
<button
class="button-default search-button"