From 3c992d2a9718b26d0ab2eadf41241c4669f13865 Mon Sep 17 00:00:00 2001 From: Edward Betts Date: Wed, 16 Oct 2019 16:18:09 +0100 Subject: [PATCH] Return focus to the search field after add depicts --- static/js/item.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/static/js/item.js b/static/js/item.js index b0ce06e..ddf0cc4 100644 --- a/static/js/item.js +++ b/static/js/item.js @@ -24,6 +24,8 @@ var app = new Vue({ this.new_depicts.push(hit); this.hits = []; this.searchTerms = ''; + var search_field = document.getElementById('search-field'); + search_field.focus(); }, run_search() { var terms = this.searchTerms;