瀏覽代碼

Fix #1282: Allow `filebrowse` event to be prevented

Kartik Visweswaran 6 年之前
父節點
當前提交
be6f6e617e
共有 3 個文件被更改,包括 2 次插入2 次删除
  1. 1 0
      CHANGE.md
  2. 1 2
      js/fileinput.js
  3. 0 0
      js/fileinput.min.js

+ 1 - 0
CHANGE.md

@@ -5,6 +5,7 @@ Change Log: `bootstrap-fileinput`
 
 **Date:** _work in process_
 
+- (bug #1282): Allow `filebrowse` event to be prevented.
 - (enh #1279): Enhance `usePdfRenderer` callback check to detect android phones.
 - Correct nuget batch file.
 

+ 1 - 2
js/fileinput.js

@@ -3546,8 +3546,7 @@
         },
         _browse: function (e) {
             var self = this;
-            self._raise('filebrowse');
-            if (e && e.isDefaultPrevented()) {
+            if (e && e.isDefaultPrevented() || !self._raise('filebrowse')) {
                 return;
             }
             if (self.isError && !self.isAjaxUpload) {

File diff suppressed because it is too large
+ 0 - 0
js/fileinput.min.js


Some files were not shown because too many files changed in this diff