Skip to content

Commit

Permalink
Fix issue where the clear search button would submit a form if the se…
Browse files Browse the repository at this point in the history
…arch widget is within an HTML form
  • Loading branch information
LukeTowers committed Dec 28, 2018
1 parent ac732be commit 2617348
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions modules/backend/widgets/search/partials/_search.htm
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,13 @@
data-load-indicator-opaque
class="form-control <?= $cssClasses ?>"
autocomplete="off" />
<button
class="clear-input-text"
<button
class="clear-input-text"
type="button"
value=""
style="<?= empty($value) ? 'display: none;' : ''; ?>"
onclick="$(this).prev().val('');$(this).prev().request();"
>
<i class="icon-times"></i>
</button>
</button>
</div>

0 comments on commit 2617348

Please sign in to comment.