We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fe592d2 commit b65993aCopy full SHA for b65993a
js/lightbox.js
@@ -120,7 +120,7 @@
120
var self = this;
121
var $window = $(window);
122
123
- $window.on("resize", this.sizeOverlay.call(this));
+ $window.on('resize', $.proxy(this.sizeOverlay, this));
124
125
$('select, object, embed').css({
126
visibility: "hidden"
@@ -233,10 +233,10 @@
233
this.currentImageIndex = imageNumber;
234
};
235
236
- // Stretch overlay to fit the document
+ // Stretch overlay to fit the viewport
237
Lightbox.prototype.sizeOverlay = function() {
238
this.$overlay
239
- .width($(document).width())
+ .width($(window).width())
240
.height($(document).height());
241
242
0 commit comments