Skip to content

Commit

Permalink
Fix (restore) Tab key behaviour in autocomplete popup (#5659)
Browse files Browse the repository at this point in the history
And make it to jump to the next field after inserting selected autocomplete entry.
  • Loading branch information
alecpl committed Mar 31, 2017
1 parent 19fcc35 commit b314dfc
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions program/js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand Down

0 comments on commit b314dfc

Please sign in to comment.