From a256762ae778708aefa545f845a939c78cfbaf0d Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Wed, 10 Apr 2019 19:25:38 +0200 Subject: [PATCH] No idea what I'm doing, but this fixes the small blink issue introduced by 95ae060 --- portal/assets/js/ynh_portal.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/portal/assets/js/ynh_portal.js b/portal/assets/js/ynh_portal.js index 6f77802..5ab562a 100644 --- a/portal/assets/js/ynh_portal.js +++ b/portal/assets/js/ynh_portal.js @@ -264,7 +264,6 @@ function init_portal_button_and_overlay() portalOverlay.setAttribute("id","ynh-overlay"); portalOverlay.setAttribute("style","visibility: hidden;"); // make sure the overlay is invisible already when loading it document.body.insertBefore(portalOverlay, null); - Element.addClass(portalOverlay, 'ynh-fadeOut'); // Inject portal button var portalButton = document.createElement('a'); @@ -283,7 +282,7 @@ function init_portal_button_and_overlay() Element.toggleClass(document.querySelector('html'), 'ynh-panel-active'); Element.toggleClass(portalOverlay, 'ynh-active'); - if (portalOverlay.classList.contains('ynh-active')) { + if (Element.hasClass(portalOverlay, 'ynh-active')) { meta_viewport.setAttribute('content', meta_viewport_content); Element.addClass(portalOverlay, 'ynh-fadeIn'); Element.removeClass(portalOverlay, 'ynh-fadeOut');