From 767793b5ca7ae5c72719fc91142bd672fa9eb7e4 Mon Sep 17 00:00:00 2001 From: ansuz Date: Fri, 2 Jun 2017 12:13:11 +0200 Subject: [PATCH] fix stuck loading tip --- customize.dist/main.css | 2 ++ customize.dist/src/less/loading.less | 3 +++ www/common/common-interface.js | 9 +++++---- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/customize.dist/main.css b/customize.dist/main.css index 36bc87fdc..49f06eedc 100644 --- a/customize.dist/main.css +++ b/customize.dist/main.css @@ -387,6 +387,8 @@ left: 0; right: 0; text-align: center; + transition: opacity 750ms; + transition-delay: 3000ms; } @media screen and (max-height: 600px) { .cp #loadingTip { diff --git a/customize.dist/src/less/loading.less b/customize.dist/src/less/loading.less index 6dcf2491a..cc23c49d9 100644 --- a/customize.dist/src/less/loading.less +++ b/customize.dist/src/less/loading.less @@ -36,6 +36,9 @@ left: 0; right: 0; text-align: center; + + transition: opacity 750ms; + transition-delay: 3000ms; @media screen and (max-height: @media-medium-screen) { display: none; } diff --git a/www/common/common-interface.js b/www/common/common-interface.js index b2b5dad10..19066b06f 100644 --- a/www/common/common-interface.js +++ b/www/common/common-interface.js @@ -194,10 +194,11 @@ define([ }; UI.removeLoadingScreen = function (cb) { $('#' + LOADING).fadeOut(750, cb); - $('#loadingTip').css('top', ''); - window.setTimeout(function () { - $('#loadingTip').fadeOut(750); - }, 3000); + $('#loadingTip').css('top', '') + // loading.less sets transition-delay: $wait-time + // and transition: opacity $fadeout-time + .css('opacity', 0); + // jquery.fadeout can get stuck }; UI.errorLoadingScreen = function (error, transparent) { if (!$('#' + LOADING).is(':visible')) { UI.addLoadingScreen(undefined, true); }