mirror of
https://github.com/Hopiu/jquery-mobile.git
synced 2026-04-06 23:50:59 +00:00
moved search input clear buttons over to "tap" event
This commit is contained in:
parent
1b72203096
commit
b4c8e2f98e
1 changed files with 2 additions and 2 deletions
|
|
@ -34,11 +34,11 @@ $.widget( "mobile.textinput", $.mobile.widget, {
|
|||
if( input.is('[type="search"],[data-type="search"]') ){
|
||||
focusedEl = input.wrap('<div class="ui-input-search ui-shadow-inset ui-btn-corner-all ui-btn-shadow ui-icon-search'+ themeclass +'"></div>').parent();
|
||||
var clearbtn = $('<a href="#" class="ui-input-clear" title="clear text">clear text</a>')
|
||||
.click(function(){
|
||||
.tap(function( e ){
|
||||
input.val('').focus();
|
||||
input.trigger('change');
|
||||
clearbtn.addClass('ui-input-clear-hidden');
|
||||
return false;
|
||||
e.preventDefault();
|
||||
})
|
||||
.appendTo(focusedEl)
|
||||
.buttonMarkup({icon: 'delete', iconpos: 'notext', corners:true, shadow:true});
|
||||
|
|
|
|||
Loading…
Reference in a new issue