Skip to content

Commit 1f1770a

Browse files
committed
jquery-form#365; fix for delegation (via: Strato)
1 parent d0e782f commit 1f1770a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

jquery.form.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*!
22
* jQuery Form Plugin
3-
* version: 3.43.0-2013.09.03
3+
* version: 3.44.0-2013.09.15
44
* Requires jQuery v1.5 or later
55
* Copyright (c) 2013 M. Alsup
66
* Examples and documentation at: http://malsup.com/jquery/form/
@@ -209,7 +209,7 @@ $.fn.ajaxSubmit = function(options) {
209209

210210
// [value] (issue #113), also see comment:
211211
// https://github.com/malsup/form/commit/588306aedba1de01388032d5f42a60159eea9228#commitcomment-2180219
212-
var fileInputs = $('input[type=file]:enabled', this).filter(function() { return $(this).val() != ''; });
212+
var fileInputs = $('input[type=file]:enabled', this).filter(function() { return $(this).val() !== ''; });
213213

214214
var hasFileInputs = fileInputs.length > 0;
215215
var mp = 'multipart/form-data';
@@ -832,7 +832,7 @@ function doAjaxSubmit(e) {
832832
var options = e.data;
833833
if (!e.isDefaultPrevented()) { // if event has been canceled, don't proceed
834834
e.preventDefault();
835-
$(this).ajaxSubmit(options);
835+
$(e.target).ajaxSubmit(options); // #365
836836
}
837837
}
838838

0 commit comments

Comments
 (0)