Skip to content
Snippets Groups Projects
Commit 9ee09945 authored by Pierre Paridans's avatar Pierre Paridans
Browse files

[FIX] mail: focus chatter composer on mobile

Sending a message on the chatter is painful as you need to scroll to see
the buttons and click to open the composer. Then again click to set the
focus in the composer (making the keyboard appear) and scroll again to be
able to write your message.

On a view form when clicking on the "New Message" or "Log Note" buttons the focus
should be put in the text field, then opening the mobile device keyboard
and scroll the view to make the text field visible.

NB: in some case on Android (both WebView and Google Chrome) the scrolling is
not operated correctly resulting into the text field being hidden behind
the keyboard. This issue looks related to some timing between the actual
focus() call and the keyboardi appearance triggered by the operating system.
Sadly we don't have any control on that part.

Related to task 1891955

closes odoo/odoo#29239
parent 2bba89c4
No related branches found
No related tags found
No related merge requests found
......@@ -275,9 +275,7 @@ var Chatter = Widget.extend({
if (oldComposer) {
oldComposer.destroy();
}
if (!config.device.isMobile) {
self._composer.focus();
}
self._composer.focus();
self._composer.on('post_message', self, function (messageData) {
self._discardOnReload(messageData).then(function () {
self._disableComposer();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment