[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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user