mobile-wizard: be sure elements are hidden

Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: Ifa238bc24b6ae0c8e196f9c2f0d4ab48ba99264b
This commit is contained in:
Szymon Kłos 2021-07-08 10:17:27 +02:00 committed by Szymon Kłos
parent b827f3a7d2
commit 424852660c

View file

@ -216,8 +216,12 @@ L.Control.MobileWizard = L.Control.extend({
var nodesToHide = $(contentToShow).siblings().not('.mobile-wizard-scroll-indicator');
var duration = 10;
if (animate)
if (animate) {
nodesToHide.hide('slide', { direction: 'left' }, duration);
// be sure all is hidden, sometimes jQuery doesn't work here ...
// restoreStyle is called in some jQuery cleanup what causes showing nodes again
setTimeout(function() { nodesToHide.hide(); }, duration + 5);
}
else
nodesToHide.hide();