diff --git a/CHANGELOG.md b/CHANGELOG.md old mode 100644 new mode 100755 index 1138da27..d3918091 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -59,6 +59,7 @@ This project adheres to [Semantic Versioning](http://semver.org/). - Module currentWeather: check if temperature received from api is defined. - Fix an issue with module hidden status changing to `true` although lock string prevented showing it - Fix newsfeed module bug (removeStartTags) +- Fixed missing animation on `this.show(speed)` when module is alone in a region. ## [2.1.0] - 2016-12-31 diff --git a/js/main.js b/js/main.js old mode 100644 new mode 100755 index e1a13d8a..ad1486ca --- a/js/main.js +++ b/js/main.js @@ -245,15 +245,18 @@ var MM = (function() { moduleWrapper.style.transition = "opacity " + speed / 1000 + "s"; // Restore the postition. See hideModule() for more info. moduleWrapper.style.position = "static"; - moduleWrapper.style.opacity = 1; updateWrapperStates(); + // Waiting for DOM-changes done in updateWrapperStates before we can start the animation. + var dummy = moduleWrapper.parentElement.parentElement.offsetHeight; + + moduleWrapper.style.opacity = 1; + clearTimeout(module.showHideTimer); module.showHideTimer = setTimeout(function() { if (typeof callback === "function") { callback(); } }, speed); - } };