From 3eae2e279a9f92b720d5bb5a8741df1a0a239a1a Mon Sep 17 00:00:00 2001 From: r888888888 Date: Tue, 17 Oct 2017 18:27:42 -0700 Subject: [PATCH] accept return on tag search input --- app/views/posts/partials/common/_search.html.erb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/views/posts/partials/common/_search.html.erb b/app/views/posts/partials/common/_search.html.erb index 49a7fe12b..b09607eb3 100644 --- a/app/views/posts/partials/common/_search.html.erb +++ b/app/views/posts/partials/common/_search.html.erb @@ -37,6 +37,11 @@ $(e.target).attr('rows', rows + 1); $(e.target).css("width", "100%"); }); + + $("#tags").keydown("return", function(e) { + $("#search-box form").submit(); + e.preventDefault(); + }); }); <% end %> \ No newline at end of file