Index: trunk/phase3/resources/jquery/jquery.placeholder.js |
— | — | @@ -37,7 +37,14 @@ |
38 | 38 | // Blank on submit -- prevents submitting with unintended value |
39 | 39 | .parents( 'form' ) |
40 | 40 | .bind( 'submit', function() { |
41 | | - $input.trigger( 'focus' ); |
| 41 | + // $input.trigger( 'focus' ); is problematic |
| 42 | + // because it actually focuses $input, leading |
| 43 | + // to nasty behavior in mobile browsers |
| 44 | + if ( $input.hasClass( 'placeholder' ) ) { |
| 45 | + $input |
| 46 | + .val( '' ) |
| 47 | + .removeClass( 'placeholder' ); |
| 48 | + } |
42 | 49 | } ); |
43 | 50 | // Show initially, if empty |
44 | 51 | if ( $input.val() == '' ) { |