mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/MultimediaViewer
synced 2024-11-17 04:43:18 +00:00
Merge "Fix bug when exiting Media Viewer while image is loading"
This commit is contained in:
commit
fff6c55695
|
@ -499,6 +499,12 @@
|
|||
|
||||
this.thumbnailPreloadQueue = this.pushLightboxImagesIntoQueue( function( lightboxImage ) {
|
||||
return function() {
|
||||
// viewer.ui.canvas.getLightboxImageWidths needs the viewer to be open
|
||||
// because it needs to read the size of visible elements
|
||||
if ( !viewer.isOpen ) {
|
||||
return;
|
||||
}
|
||||
|
||||
return viewer.fetchThumbnailForLightboxImage(
|
||||
lightboxImage,
|
||||
viewer.ui.canvas.getLightboxImageWidths( lightboxImage ).real
|
||||
|
|
Loading…
Reference in a new issue