mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/MultimediaViewer
synced 2024-09-29 13:17:35 +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 ) {
|
this.thumbnailPreloadQueue = this.pushLightboxImagesIntoQueue( function( lightboxImage ) {
|
||||||
return function() {
|
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(
|
return viewer.fetchThumbnailForLightboxImage(
|
||||||
lightboxImage,
|
lightboxImage,
|
||||||
viewer.ui.canvas.getLightboxImageWidths( lightboxImage ).real
|
viewer.ui.canvas.getLightboxImageWidths( lightboxImage ).real
|
||||||
|
|
Loading…
Reference in a new issue