From 2241421761d991f1b14426c6bd42c3c79637f6a6 Mon Sep 17 00:00:00 2001 From: Wim Brand Date: Thu, 18 Jul 2019 20:36:55 +0200 Subject: [PATCH] Fix close button check --- res/static/script/Viewer.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/res/static/script/Viewer.js b/res/static/script/Viewer.js index e656cdb..c711e4d 100644 --- a/res/static/script/Viewer.js +++ b/res/static/script/Viewer.js @@ -20,7 +20,7 @@ var Viewer = { // The close button only works if the window has an opener. So we hide // the button if it does not - if (window.opener === null) { + if (window.opener === null && window.history.length !== 1) { $("#button_close_file_viewer").remove(); }