diff --git a/static/js/item.js b/static/js/item.js index ddf0cc4..927cda0 100644 --- a/static/js/item.js +++ b/static/js/item.js @@ -24,8 +24,7 @@ var app = new Vue({ this.new_depicts.push(hit); this.hits = []; this.searchTerms = ''; - var search_field = document.getElementById('search-field'); - search_field.focus(); + this.$refs.search.focus(); }, run_search() { var terms = this.searchTerms; diff --git a/templates/item.html b/templates/item.html index d7829ec..0ba21ea 100644 --- a/templates/item.html +++ b/templates/item.html @@ -152,7 +152,7 @@ span.description { color: rgb(96, 96, 96); } - +