Skip to content
This repository has been archived by the owner on Jun 24, 2019. It is now read-only.

Commit

Permalink
fix: only autofocus when search term is empty
Browse files Browse the repository at this point in the history
  • Loading branch information
Christian Kruse committed Jun 28, 2015
1 parent e242aed commit a0fdc17
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/views/cf_search/show.html.erb
Expand Up @@ -11,7 +11,7 @@ content_for :robots, 'noindex,nofollow'
<label for="term"><%= t('search.search_for') %></label>

<div class="cntrls">
<%= search_field_tag 'term', params[:term], placeholder: t('search.search_term'), autofocus: true %>
<%= search_field_tag 'term', params[:term], placeholder: t('search.search_term'), autofocus: params[:term].blank? ? true : false %>

<ul class="search-explanation">
<li><code>-</code> vor einem Begriff: der Begriff darf nicht vorkommen</li>
Expand Down

0 comments on commit a0fdc17

Please sign in to comment.