Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixes #1459 — Clicking on a search input’s “clear” button now returns…

… focus to the search input.
  • Loading branch information...
commit cbe432016e8bfce952dfb979b4c77f20da9e0473 1 parent f0acc75
@Wilto Wilto authored
Showing with 5 additions and 3 deletions.
  1. +5 −3 js/jquery.mobile.forms.textinput.js
View
8 js/jquery.mobile.forms.textinput.js
@@ -49,9 +49,11 @@ $.widget( "mobile.textinput", $.mobile.widget, {
focusedEl = input.wrap( "<div class='ui-input-search ui-shadow-inset ui-btn-corner-all ui-btn-shadow ui-icon-searchfield" + themeclass + miniclass + "'></div>" ).parent();
clearbtn = $( "<a href='#' class='ui-input-clear' title='clear text'>clear text</a>" )
- .tap(function( event ) {
- input.val( "" ).focus();
- input.trigger( "change" );
+ .bind('click', function( event ) {
+ input
+ .val( "" )
+ .focus()
+ .trigger( "change" );
clearbtn.addClass( "ui-input-clear-hidden" );
event.preventDefault();
})
Please sign in to comment.
Something went wrong with that request. Please try again.