Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/gallery.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlivier Paroz <github@oparoz.com>2015-10-06 12:36:22 +0300
committerOlivier Paroz <github@oparoz.com>2015-10-06 12:36:22 +0300
commitde642bc21f90a8fc4f4a1f7e35025970c3e889b0 (patch)
tree1519c7d6ecacdefd91910b5d0494229f96082e3e
parent0a9e4b3f91e06d7f50ffe9214e38b765c01c87a6 (diff)
Force Chrome to reload images after image.onerror
-rw-r--r--js/thumbnail.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/js/thumbnail.js b/js/thumbnail.js
index 0353d6e5..92398722 100644
--- a/js/thumbnail.js
+++ b/js/thumbnail.js
@@ -132,7 +132,8 @@ function Thumbnail (fileId, square) {
};
thumb.image.onerror = function () {
thumb.valid = false;
- thumb.image.src = Thumbnails._getMimeIcon(preview.mimetype);
+ var icon = Thumbnails._getMimeIcon(preview.mimetype);
+ setTimeout(function(){ thumb.image.src = icon; }, 0);
};
if (thumb.status === 200) {