[FIX] mail: fix emoji offset when clicking on category

This PR fixes the offset that happened when clicking
on a category in the emoji picker

Task-2991668

closes odoo/odoo#100769

X-original-commit: 299e74b2510b94a4dea526080d48b7563190a097
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
This commit is contained in:
Nemael
2022-09-22 12:23:34 +02:00
committed by Alexandre Kühn
parent 7ffc505599
commit 47541460f5
@@ -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() });
},
/**