From 356a53de52e529aca748d56fbed9c741fddaa345 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lukas=20F=C3=BClling?= Date: Wed, 13 Feb 2019 19:27:34 +0100 Subject: [PATCH] fix overlay issues --- portal/assets/css/ynhpanel.css | 44 ++++++++++++++++++++++++++-------- portal/assets/js/ynhpanel.js | 6 ++--- 2 files changed, 36 insertions(+), 14 deletions(-) diff --git a/portal/assets/css/ynhpanel.css b/portal/assets/css/ynhpanel.css index d895790..45aa8ee 100644 --- a/portal/assets/css/ynhpanel.css +++ b/portal/assets/css/ynhpanel.css @@ -56,14 +56,14 @@ body {/*overflow-y: scroll;*/} /* Background */ #ynh-overlay { - display: block; + visibility: hidden; position: fixed; top:0; left: 0; width: 100%; height: 100%; z-index: 9999999; - opacity: 0; + display: block; border: none; color:#fff; background: #41444F; @@ -79,12 +79,24 @@ body {/*overflow-y: scroll;*/} /*FadeIn*/ @-webkit-keyframes fadeIn { - 0% {opacity: 0;} - 100% {opacity: 1;} + 0% { + visibility: hidden; + opacity:0; + } + 100% { + visibility: visible; + opacity: 1; + } } @keyframes fadeIn { - 0% {opacity: 0;} - 100% {opacity: 1;} + 0% { + visibility: hidden; + opacity: 0; + } + 100% { + visibility: visible; + opacity: 1; + } } .ynh-fadeIn { @@ -106,12 +118,24 @@ body {/*overflow-y: scroll;*/} /*FadeOut*/ @-webkit-keyframes fadeOut { - 0% {opacity: 1;} - 100% {opacity: 0;} + 0% { + visibility: visible; + opacity: 1; + } + 100% { + visibility: hidden; + opacity: 0; + } } @keyframes fadeOut { - 0% {opacity: 1;} - 100% {opacity: 0;} + 0% { + visibility: visible; + opacity: 1; + } + 100% { + visibility: hidden; + opacity: 0; + } } .ynh-fadeOut { -webkit-animation-name: fadeOut; diff --git a/portal/assets/js/ynhpanel.js b/portal/assets/js/ynhpanel.js index 6fc4c66..b104c4a 100644 --- a/portal/assets/js/ynhpanel.js +++ b/portal/assets/js/ynhpanel.js @@ -192,8 +192,7 @@ var dragg = function(id) { // Reset dragging status dragged = false; }); -} - +}; /* Smallest DOMReady http://dustindiaz.com/smallest-domready-ever @@ -239,7 +238,7 @@ domReady(function(){ var overlay = document.createElement('iframe'); overlay.src = "/yunohost/sso/info.html"; overlay.setAttribute("id","ynh-overlay"); - overlay.setAttribute("style","opacity:0"); // make sure the overlay is invisible already when loading it + overlay.setAttribute("style","visibility: hidden;"); // make sure the overlay is invisible already when loading it document.body.insertBefore(overlay, null); @@ -294,5 +293,4 @@ domReady(function(){ }; r.send(); - });