diff --git a/addons/mail/static/src/models/emoji_grid_view.js b/addons/mail/static/src/models/emoji_grid_view.js index 47ad8bc6396..89786be35ff 100644 --- a/addons/mail/static/src/models/emoji_grid_view.js +++ b/addons/mail/static/src/models/emoji_grid_view.js @@ -19,15 +19,9 @@ registerModel({ }); }, doJumpToCategorySelectedByUser() { - let categoryRowScrollPosition = Math.max( - 0, - // Index of the beginning of the category - (this.rowHeight * this.categorySelectedByUser.emojiGridRowView.index) - - - // Cancels the amount of buffer rows - (this.rowHeight * this.topBufferAmount) - ); - this.containerRef.el.scrollTo({ top: categoryRowScrollPosition }); + this.containerRef.el.scrollTo({ + top: this.rowHeight * this.categorySelectedByUser.emojiGridRowView.index, + }); this.update({ categorySelectedByUser: clear() }); }, /**