From 2d28c88dd7a6765a6d2ed54758bbb4c3da999331 Mon Sep 17 00:00:00 2001 From: Johannes Zellner Date: Tue, 3 Mar 2020 17:59:17 +0100 Subject: Carry over public.html fixes to index.html --- frontend/js/app.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'frontend/js/app.js') diff --git a/frontend/js/app.js b/frontend/js/app.js index 9ce073e..f532bc1 100644 --- a/frontend/js/app.js +++ b/frontend/js/app.js @@ -150,7 +150,15 @@ function open(row, column, event) { app.activeEntry.fullPath = encode(sanitize(app.path + '/' + row.filePath)); app.previewDrawerVisible = true - // window.open(encode(path)); + // need to wait for DOM element to exist + setTimeout(function () { + $('iframe').on('load', function (e) { + if (!e.target.contentWindow.document.body) return; + + e.target.contentWindow.document.body.style.display = 'flex' + e.target.contentWindow.document.body.style.justifyContent = 'center' + }); + }, 0); } function uploadFiles(files) { -- cgit v1.2.3