Skip to content

Commit

Permalink
input attribute fix (#165)
Browse files Browse the repository at this point in the history
  • Loading branch information
underr authored May 13, 2020
1 parent 37ad3ce commit f5cea7d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion js/simplesearch.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
var fields = document.querySelectorAll('input[name="searchfield"][data-search-input]');
Array.prototype.forEach.call(fields, function(field) {
var form = findAncestor(field, 'form[data-simplesearch-form]'),
min = field.getAttribute('min') || false,
min = field.getAttribute('data-min') || false,
location = field.getAttribute('data-search-input'),
separator = field.getAttribute('data-search-separator');

Expand Down
2 changes: 1 addition & 1 deletion templates/partials/simplesearch_searchbox.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
class="search-input"
aria-label="search"
type="text"
{% if min_chars > 0 %} min="{{- min_chars -}}" {% endif %}
{% if min_chars > 0 %} data-min="{{- min_chars -}}" {% endif %}
required
placeholder="{{"PLUGIN_SIMPLESEARCH.SEARCH_PLACEHOLDER"|t}}"
value="{{ query|e }}"
Expand Down

0 comments on commit f5cea7d

Please sign in to comment.