From 31f02764522af4a96e0f3cbb834236c5debb6220 Mon Sep 17 00:00:00 2001 From: nscnm87 Date: Fri, 8 Nov 2019 13:23:51 +0100 Subject: [PATCH] Resize overlay issue The current function doesn't work well when the viewport is resized to a smaller size as the document width and height remains bigger than the window size --- src/js/lightbox.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/js/lightbox.js b/src/js/lightbox.js index 8d8ea06c..993ba992 100644 --- a/src/js/lightbox.js +++ b/src/js/lightbox.js @@ -379,8 +379,8 @@ */ setTimeout(function() { self.$overlay - .width($(document).width()) - .height($(document).height()); + .width($(window).width()) + .height($(window).height()); }, 0); };