Skip to content

Commit 79c1864

Browse files
committed
jquery-form#214; upload cancel improvements.
1 parent ab96d5f commit 79c1864

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

jquery.form.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -316,6 +316,13 @@ $.fn.ajaxSubmit = function(options) {
316316
var e = (status === 'timeout' ? 'timeout' : 'aborted');
317317
log('aborting upload... ' + e);
318318
this.aborted = 1;
319+
// #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();
325+
}
319326
$io.attr('src', s.iframeSrc); // abort op in progress
320327
xhr.error = e;
321328
if (s.error)

0 commit comments

Comments
 (0)