From ec25baa3445940ce560f6267f753235b8ba4e524 Mon Sep 17 00:00:00 2001 From: evykassirer Date: Tue, 25 Jul 2023 11:49:30 -0700 Subject: [PATCH] compose: Return focus to DM input after pill selection. Before this change, the cursor left the DM recipient box after selecting a pill from the typeahead. This was only the case with mouse clicks and not with keyboard selection. This change ensures we always return focus to the input field after selection. --- web/src/compose_pm_pill.js | 1 + 1 file changed, 1 insertion(+) diff --git a/web/src/compose_pm_pill.js b/web/src/compose_pm_pill.js index 1d7ee77188..1e6a7a854e 100644 --- a/web/src/compose_pm_pill.js +++ b/web/src/compose_pm_pill.js @@ -29,6 +29,7 @@ export function initialize({on_pill_create_or_remove}) { widget.onPillCreate(() => { on_pill_create_or_remove(); + $("#private_message_recipient").trigger("focus"); }); widget.onPillRemove(() => {