From b4c8e2f98e64c52c828fd63b7a73fd587c4ad30c Mon Sep 17 00:00:00 2001 From: scottjehl Date: Fri, 28 Jan 2011 15:20:56 -0800 Subject: [PATCH] moved search input clear buttons over to "tap" event --- js/jquery.mobile.forms.textinput.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/jquery.mobile.forms.textinput.js b/js/jquery.mobile.forms.textinput.js index b1643bf0..a2d64d10 100644 --- a/js/jquery.mobile.forms.textinput.js +++ b/js/jquery.mobile.forms.textinput.js @@ -34,11 +34,11 @@ $.widget( "mobile.textinput", $.mobile.widget, { if( input.is('[type="search"],[data-type="search"]') ){ focusedEl = input.wrap('').parent(); var clearbtn = $('clear text') - .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});