summaryrefslogtreecommitdiff
path: root/addons/mail/static/src/js/thread_windows/thread_window.js
diff options
context:
space:
mode:
authormgh-odoo <mgh@odoo.com>2019-01-15 06:19:40 +0000
committerAlexandre Kühn <aku@odoo.com>2019-02-19 09:56:26 +0000
commite096dc9b6685b369d036b0a524ba006733263581 (patch)
tree38bfd42785ac3f50a7c6b03c4661a39090ba141e /addons/mail/static/src/js/thread_windows/thread_window.js
parentc564ae6c87a79832d94de99d650d437fcf68b1c1 (diff)
[IMP] mail : autofocus items in autocomplete inputs
With this commit, when using autocomplete inputs in Discuss or chat windows, the 1st item is automatically auto-focused. Example of autocomplete inputs: - Discuss: "Add or join a channel" in sidebar - Chat window: when clicking on "New Message" from systray messaging menu. As a result, we can use keyboard keys to navigate and select the desired item. Task-ID 1894447 closes odoo/odoo#30207
Diffstat (limited to 'addons/mail/static/src/js/thread_windows/thread_window.js')
-rw-r--r--addons/mail/static/src/js/thread_windows/thread_window.js1
1 files changed, 1 insertions, 0 deletions
diff --git a/addons/mail/static/src/js/thread_windows/thread_window.js b/addons/mail/static/src/js/thread_windows/thread_window.js
index 41b0ef6d36c..11a7f8a7926 100644
--- a/addons/mail/static/src/js/thread_windows/thread_window.js
+++ b/addons/mail/static/src/js/thread_windows/thread_window.js
@@ -238,6 +238,7 @@ var ThreadWindow = AbstractThreadWindow.extend({
this.$el.addClass('o_thread_less');
this.$('.o_thread_search_input input')
.autocomplete({
+ autoFocus: true,
source: function (request, response) {
self.call('mail_service', 'searchPartner', request.term, 10)
.done(response);