From 3a385234326cdbd208a82ffd8259fb4236f6b3eb Mon Sep 17 00:00:00 2001 From: "Alex A. Naanou" Date: Thu, 27 Jul 2023 17:00:34 +0300 Subject: [PATCH] added option to exit fullscreen on lightbox close... Signed-off-by: Alex A. Naanou --- grid-n-view.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/grid-n-view.js b/grid-n-view.js index d179943..13f4a3a 100644 --- a/grid-n-view.js +++ b/grid-n-view.js @@ -166,6 +166,8 @@ var Gallery = { click_to_select: true, + exit_fullscreen_on_lightbox_close: true, + // Mode to select the above/below image... // // @@ -643,6 +645,8 @@ var Lightbox = { this.dom.querySelector('.close') .addEventListener('click', function(evt){ evt.stopPropagation() + that.gallery.exit_fullscreen_on_lightbox_close + && document.exitFullscreen() that.hide() }) this.dom.querySelector('.fullscreen') .addEventListener('click', function(evt){