Skip to content

Commit 5459528

Browse files
committed
Allow event bubbling for click events.
In jQuery event handlers, returning false results in calling both e.preventDefault() and e.stopPropagation().
1 parent 5238bef commit 5459528

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

example/application.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* jQuery File Upload Plugin JS Example 4.2
2+
* jQuery File Upload Plugin JS Example 4.2.1
33
* https://github.com/blueimp/jQuery-File-Upload
44
*
55
* Copyright 2010, Sebastian Tschan
@@ -46,7 +46,7 @@ $(function () {
4646
callBack();
4747
}
4848
);
49-
return false;
49+
e.preventDefault();
5050
});
5151
},
5252
maxChunkSize: 10000000
@@ -70,12 +70,12 @@ $(function () {
7070
});
7171
}
7272
});
73-
return false;
73+
e.preventDefault();
7474
});
7575

7676
$('#file_upload_start, #file_upload_cancel, #file_upload_delete').click(function () {
7777
$('#files .' + $(this).attr('id') + ' button:visible').click();
78-
return false;
78+
e.preventDefault();
7979
});
8080

8181
$('#file_upload')

jquery.fileupload-ui.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* jQuery File Upload User Interface Plugin 4.2.1
2+
* jQuery File Upload User Interface Plugin 4.2.2
33
* https://github.com/blueimp/jQuery-File-Upload
44
*
55
* Copyright 2010, Sebastian Tschan
@@ -293,7 +293,7 @@
293293
);
294294
uploadRow.find(handler.cancelSelector).click(function (e) {
295295
handler.cancelUpload(e, files, index, xhr, handler);
296-
return false;
296+
e.preventDefault();
297297
});
298298
uploadRow.find(handler.previewSelector).each(function () {
299299
var previewNode = $(this),

0 commit comments

Comments
 (0)