Skip to content
Snippets Groups Projects
Commit e95c1115 authored by Henrik Askjer's avatar Henrik Askjer
Browse files

fix accesskey

parent 35145fc5
No related branches found
No related tags found
No related merge requests found
......@@ -16,7 +16,6 @@
auto-select-first
hide-details
:label="$t('search_placeholder')"
accesskey="/"
solo
full-width
:placeholder="$t('search_placeholder')"
......@@ -187,12 +186,19 @@
}
},
mounted: function() {
mounted: function() {
if (!this.$route.hash) {
if(!this.$store.state.noMouse && this.$vuetify.breakpoint.mdAndUp) {
this.$refs.autocomplete.$refs.input.focus()
}
}
document.addEventListener("keyup", e => {
if (e.key !== "/") return;
if (e.altKey || e.ctrlKey || e.metaKey);
if (/^(?:input|textarea|select)$/i.test(e.target.tagName)) return;
this.$refs.autocomplete.$refs.input.focus()
});
}
}
</script>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment