From b314dfc5483571aea9901b6394d316abb2661888 Mon Sep 17 00:00:00 2001 From: Aleksander Machniak Date: Fri, 31 Mar 2017 13:28:54 +0200 Subject: [PATCH] Fix (restore) Tab key behaviour in autocomplete popup (#5659) And make it to jump to the next field after inserting selected autocomplete entry. --- program/js/app.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/program/js/app.js b/program/js/app.js index 9079b4ddd9e..17b9b301cc8 100644 --- a/program/js/app.js +++ b/program/js/app.js @@ -5407,6 +5407,12 @@ function rcube_webmail() return rcube_event.cancel(e); + case 9: // tab + if (rcube_event.get_modifier(e) == SHIFT_KEY || !this.ksearch_visible()) { + this.ksearch_hide(); + return; + } + case 13: // enter if (!this.ksearch_visible()) return false; @@ -5415,9 +5421,9 @@ function rcube_webmail() this.insert_recipient(this.ksearch_selected); this.ksearch_hide(); - return rcube_event.cancel(e); + // Don't cancel on Tab, we want to jump to the next field (#5659) + return key == 9 ? null : rcube_event.cancel(e); - case 9: // tab case 27: // escape this.ksearch_hide(); return;