Fix that FireFox < v33 is unable to find the button that got the focus
This commit is contained in:
parent
7569c55796
commit
f7d168c80f
|
@ -197,6 +197,13 @@
|
||||||
var $target;
|
var $target;
|
||||||
var data;
|
var data;
|
||||||
|
|
||||||
|
if ($button.length === 0) {
|
||||||
|
var $el = $(event.currentTarget);
|
||||||
|
if ($el.is('input[type=submit]') || $el.is('button[type=submit]')) {
|
||||||
|
$button = $el;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (typeof method === 'undefined') {
|
if (typeof method === 'undefined') {
|
||||||
method = 'POST';
|
method = 'POST';
|
||||||
} else {
|
} else {
|
||||||
|
@ -204,10 +211,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($button.length === 0) {
|
if ($button.length === 0) {
|
||||||
$button = $('input[type=submit]', $form).first();
|
$button = $('input[type=submit]', $form).add('button[type=submit]', $form).first();
|
||||||
if ($button.length === 0) {
|
|
||||||
$button = $('button[type=submit]', $form).first();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
event.stopPropagation();
|
event.stopPropagation();
|
||||||
|
|
Loading…
Reference in New Issue