From 3531463ac9c8d100b4cdcd81819eea59487a653c Mon Sep 17 00:00:00 2001 From: akshatdalton Date: Tue, 27 Jul 2021 22:37:37 +0000 Subject: [PATCH] composebox_typeahead: Trigger foucs to send button only after keyup event. As explained in the commit 3a35a0b72c9b2c46ed0afa6456d4a5a80a2c12f9: `nextFocus` is set on a keydown event to indicate where we should focus on keyup. We can't focus at the time of keydown because we need to wait for typeahead. And we can't compute where to focus at the time of keyup because only the keydown has reliable information about whether it was a Tab or a Shift+Tab. Though the previous configuration didn't show any bug but we should follow the same logic here also. --- static/js/composebox_typeahead.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/static/js/composebox_typeahead.js b/static/js/composebox_typeahead.js index 33c87c1840..4deb6c3bc5 100644 --- a/static/js/composebox_typeahead.js +++ b/static/js/composebox_typeahead.js @@ -216,8 +216,7 @@ function handle_keydown(e) { // which does not make