summaryrefslogtreecommitdiff
path: root/addons/mail/static/src/components/thread_view/thread_view.js
diff options
context:
space:
mode:
authorPriyanka Kakadiya <pka@odoo.com>2021-01-29 11:55:19 +0000
committerPriyanka Kakadiya <pka@odoo.com>2021-03-10 13:30:18 +0000
commit2542f731c5b06c3b451ecde7992d3bb45adb2c60 (patch)
treed590eab9af3504ca9c4932cca13d36070ac3489a /addons/mail/static/src/components/thread_view/thread_view.js
parenta8b43d02066b2299ac2f4b88056c37725e9ce6cd (diff)
[FIX] mail: fix keyboard shortcut issue for small screen
Current behavior before PR: When having a small screen, the composer in a chat window has no actual shortcut to send the message. Desired behavior after PR is merged: 'CTRL-Enter' keyboard shortcut will work for small screen size. LINKS: PR https://github.com//pull/65241 Task-2446076 closes odoo/odoo#65241 Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Diffstat (limited to 'addons/mail/static/src/components/thread_view/thread_view.js')
-rw-r--r--addons/mail/static/src/components/thread_view/thread_view.js7
1 files changed, 6 insertions, 1 deletions
diff --git a/addons/mail/static/src/components/thread_view/thread_view.js b/addons/mail/static/src/components/thread_view/thread_view.js
index 8a4898d6f3a..5b0f5f4a57a 100644
--- a/addons/mail/static/src/components/thread_view/thread_view.js
+++ b/addons/mail/static/src/components/thread_view/thread_view.js
@@ -20,7 +20,11 @@ class ThreadView extends Component {
constructor(...args) {
super(...args);
useShouldUpdateBasedOnProps();
- useStore((...args) => this._useStoreSelector(...args));
+ useStore((...args) => this._useStoreSelector(...args), {
+ compareDepth: {
+ threadTextInputSendShortcuts: 1,
+ },
+ });
useUpdate({ func: () => this._update() });
/**
* Reference of the composer. Useful to set focus on composer when
@@ -133,6 +137,7 @@ class ThreadView extends Component {
threadIsTemporary: thread && thread.isTemporary,
threadMassMailing: thread && thread.mass_mailing,
threadModel: thread && thread.model,
+ threadTextInputSendShortcuts: thread && thread.textInputSendShortcuts || [],
threadView,
threadViewIsLoading: threadView && threadView.isLoading,
};