Skip to content

Commit ff80d9d

Browse files
committed
jquery-form#214; improve fix for stopping upload aborts
1 parent 8914e4b commit ff80d9d

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

jquery.form.js

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*!
22
* jQuery Form Plugin
3-
* version: 3.13 (29-JUL-2012)
3+
* version: 3.14 (30-JUL-2012)
44
* @requires jQuery v1.3.2 or later
55
*
66
* Examples and documentation at: http://malsup.com/jquery/form/
@@ -317,11 +317,10 @@ $.fn.ajaxSubmit = function(options) {
317317
log('aborting upload... ' + e);
318318
this.aborted = 1;
319319
// #214
320-
if (io.contentWindow.document.execCommand) { // IE browsers
321-
io.contentWindow.document.execCommand('Stop');
322-
}
323-
else if (io.contentWindow.stop) { // other browsers
324-
io.contentWindow.stop();
320+
if (io.contentWindow.document.execCommand) {
321+
try { // #214
322+
io.contentWindow.document.execCommand('Stop');
323+
} catch(ignore) {}
325324
}
326325
$io.attr('src', s.iframeSrc); // abort op in progress
327326
xhr.error = e;

0 commit comments

Comments
 (0)