From cc77e68341507319473e6150a44817c8c182a982 Mon Sep 17 00:00:00 2001 From: Hadi Nategh Date: Tue, 18 May 2021 11:40:20 +0200 Subject: [PATCH] Fix darkmode for mobile popups running in iframes --- pixelegg/js/fw_mobile.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pixelegg/js/fw_mobile.js b/pixelegg/js/fw_mobile.js index 3c1a560510..13220f901f 100644 --- a/pixelegg/js/fw_mobile.js +++ b/pixelegg/js/fw_mobile.js @@ -249,6 +249,13 @@ var $appHeader = jQuery(popupWindow.document).find('#divAppboxHeader'); var $et2_container = jQuery(popupWindow.document).find('.et2_container'); jQuery(popupWindow.document.body).css({'overflow-y':'auto'}); + + var darkmode = egw.getSessionItem('api', 'darkmode'); + if (darkmode == '0' || darkmode == '1') + { + // set darkmode for iframe popup content + jQuery(popupWindow.document.body.parentElement).attr('data-darkmode', darkmode == 0?'':'1'); + } if ($appHeader.length > 0) { // Extend the dialog to 100% width