mirror of
https://github.com/Hopiu/jquery-mobile.git
synced 2026-04-30 19:04:43 +00:00
Prevent inputs and buttons of type="button" from getting the submit click handler added to them.
This commit is contained in:
parent
df21c701b5
commit
48ab0ec7d6
1 changed files with 2 additions and 1 deletions
|
|
@ -35,7 +35,8 @@ $.widget( "mobile.button", $.mobile.widget, {
|
|||
.append( $el.addClass('ui-btn-hidden') );
|
||||
|
||||
//add hidden input during submit
|
||||
if( $el.attr('type') !== 'reset' ){
|
||||
var type = $el.attr('type');
|
||||
if( type !== 'button' && type !== 'reset' ){
|
||||
$el.click(function(){
|
||||
var $buttonPlaceholder = $("<input>",
|
||||
{type: "hidden", name: $el.attr("name"), value: $el.attr("value")})
|
||||
|
|
|
|||
Loading…
Reference in a new issue