Browse Source

Fix #1734: Correct zoom data refresh for each individual file upload

Kartik Visweswaran 3 years ago
parent
commit
72f7bb4e7f
3 changed files with 3 additions and 6 deletions
  1. 1 0
      CHANGE.md
  2. 2 6
      js/fileinput.js
  3. 0 0
      js/fileinput.min.js

+ 1 - 0
CHANGE.md

@@ -5,6 +5,7 @@ Change Log: `bootstrap-fileinput`
 
 **Date**: _under development_
 
+- (bug #1734): Correct zoom data refresh for each individual file upload.
 - (enh #1731): Enhance RTL Styling for bootstrap 4/5 input groups.
 - (enh #1730): Enhancements for bootstrap input group styles.
   - New plugin option `inputGroupClass` - defaults to empty string

+ 2 - 6
js/fileinput.js

@@ -3442,7 +3442,7 @@
             self[prop] = arr1.concat(arr2);
         },
         _initUploadSuccess: function (out, $thumb, allFiles) {
-            var self = this, append, data, index, $div, $newCache, content, config, tags, id, i;
+            var self = this, append, data, index, $div, content, config, tags, id, i;
             if (!self.showPreview || typeof out !== 'object' || $.isEmptyObject(out)) {
                 self._resetCaption();
                 return;
@@ -3466,12 +3466,8 @@
                         index = self.previewCache.add(content[0], config[0], tags[0], append);
                         data = self.previewCache.get(index, false);
                         $div = $h.createElement(data).hide().appendTo($thumb);
-                        $newCache = $div.find('.kv-zoom-cache');
-                        if ($newCache && $newCache.length) {
-                            $newCache.appendTo($thumb);
-                        }
                         $thumb.fadeOut('slow', function () {
-                            var $newThumb = $div.find('.file-preview-frame');
+                            var $newThumb = $div.find('> .file-preview-frame');
                             if ($newThumb && $newThumb.length) {
                                 $newThumb.insertBefore($thumb).fadeIn('slow').css('display:inline-block');
                             }

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