Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 40dfdc7

Browse files
committed
Allow to prevent default event actions by calling event.preventDefault() in scope file upload event listeners. Closes blueimp#2436
1 parent 6390a6c commit 40dfdc7

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

js/jquery.fileupload-angular.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* jQuery File Upload AngularJS Plugin 1.4.0
2+
* jQuery File Upload AngularJS Plugin 1.4.1
33
* https://github.com/blueimp/jQuery-File-Upload
44
*
55
* Copyright 2013, Sebastian Tschan
@@ -296,7 +296,9 @@
296296
'fileuploadprocessalways',
297297
'fileuploadprocessstop'
298298
].join(' '), function (e, data) {
299-
$scope.$emit(e.type, data);
299+
if ($scope.$emit(e.type, data).defaultPrevented) {
300+
e.preventDefault();
301+
}
300302
}).on('remove', function () {
301303
// Remove upload methods from the scope,
302304
// when the widget is removed:

0 commit comments

Comments
 (0)