diff --git a/addons/mail/static/src/js/thread_windows/abstract_thread_window.js b/addons/mail/static/src/js/thread_windows/abstract_thread_window.js index ff5acfea0d2..7a38d337f24 100644 --- a/addons/mail/static/src/js/thread_windows/abstract_thread_window.js +++ b/addons/mail/static/src/js/thread_windows/abstract_thread_window.js @@ -83,6 +83,8 @@ var AbstractThreadWindow = Widget.extend({ displayStars: this.options.displayStars, }); + // animate the (un)folding of thread windows + this.$el.css({transition: 'height ' + this.FOLD_ANIMATION_DURATION + 'ms linear'}); if (this.isFolded()) { this.$el.css('height', this.HEIGHT_FOLDED); } else if (this.options.autofocus) { @@ -319,24 +321,14 @@ var AbstractThreadWindow = Widget.extend({ this._focusInput(); } } - this._animateFold(); + var height = this.isFolded() ? this.HEIGHT_FOLDED : this.HEIGHT_OPEN; + this.$el.css({height: height}); }, //-------------------------------------------------------------------------- // Private //-------------------------------------------------------------------------- - /** - * Called when there is a change of the fold state of the thread window. - * This method animates the change of fold state of this thread window. - * - * @private - */ - _animateFold: function () { - this.$el.animate({ - height: this.isFolded() ? this.HEIGHT_FOLDED : this.HEIGHT_OPEN - }, this.FOLD_ANIMATION_DURATION); - }, /** * Set the focus on the composer of the thread window. This operation is * ignored in mobile context.