Prevent img preview flickering with an empty pixel image

This commit is contained in:
Johannes Zellner
2021-05-20 17:14:58 +02:00
parent 691013d7e0
commit e79c90f330

View File

@@ -794,6 +794,9 @@ app.controller('FileManagerController', ['$scope', '$translate', '$timeout', 'Cl
},
close: function () {
// set an empty pixel image to bust the cached img to avoid flickering on slow load
$scope.mediaViewer.src = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mP8z/C/HgAGgwJ/lK3Q6wAAAABJRU5ErkJggg==';
$('#mediaViewerModal').modal('hide');
}
};