[FIX] mail: keep input focus on emoji selection

Before this commit, when adding an emoji from the emoji menu next
to the composer, the focus was not automatically set on the input.

The input was correctly focused during the event handler of the
clicked emoji, but the browser default behaviour applied right
after was focusing out the input.

Task-ID 1943770

closes odoo/odoo#31325
This commit is contained in:
Alexandre Kühn
2019-02-21 12:23:01 +00:00
parent aa21cfcf02
commit 4e0a7cd944
@@ -685,6 +685,7 @@ var BasicComposer = Widget.extend({
* @param {Event} ev
*/
_onEmojiImageClick: function (ev) {
ev.preventDefault();
var cursorPosition = this.getSelectionPositions();
var inputVal = this.$input.val();
var leftSubstring = inputVal.substring(0, cursorPosition.start);