diff options
| author | Alexandre Kühn <aku@odoo.com> | 2019-01-30 11:59:51 +0000 |
|---|---|---|
| committer | Alexandre Kühn <aku@odoo.com> | 2019-01-30 12:23:28 +0000 |
| commit | 1a774f9e0e9dbc67cf9661d6aa07f5ce5640d779 (patch) | |
| tree | 638b8033cbfbb4eae8a951498a87998f71aa7e33 /addons/web/static/src/js/views/basic/basic_controller.js | |
| parent | 1dac41313005c9035a5f8d3c9db83dcad7883f24 (diff) | |
[FIX] mail: click on item from composer's emoji menu
Before this commit, clicking on an item from the
emoji menu of a composer was not putting the emoji
in the input.
Steps to reproduce:
- Open discuss app
- Select a conversation with a composer
- click on emoji menu in the right-side of the composer
- click on an emoji in the emoji menu
> the emoji has not been put in the input of the composer
This problem was caused by a race condition with the event
`focusout` on the emoji button and the `click` on an emoji
item. `focusout` always happens before `click`, and `click`
event following a `focusout` event can only happen when the
element is visible. This was not the case, because the emoji
container is removed from the `focusout`, so no `click` is
triggered on the emoji item.
This commit fixes the issue by listening on `mousedown` on
the emoji item instead of `click`, which is triggered before
`focusout`.
closes odoo/odoo#30694
Diffstat (limited to 'addons/web/static/src/js/views/basic/basic_controller.js')
0 files changed, 0 insertions, 0 deletions
