diff --git a/frontend/packages/dashboard/src/flow.js b/frontend/packages/dashboard/src/flow.js index 2d4de8a4..b89cd78d 100644 --- a/frontend/packages/dashboard/src/flow.js +++ b/frontend/packages/dashboard/src/flow.js @@ -353,10 +353,12 @@ import { epochSec } from "./util.js"; } function updateSuggest() { const v = input.value; - // Only suggest when an @-token sits at the very start of the - // input — switching recipient is always "redirect this whole - // line." Mid-message @-mentions stay literal. - const m = v.match(/^@(\S*)/); + // Only suggest while the cursor is still inside the @-token at the + // very start of the input — switching recipient is always "redirect + // this whole line." Once whitespace follows the token the recipient + // is chosen: the list must close, or it swallows the Enter that + // should send. Mid-message @-mentions stay literal. + const m = v.match(/^@(\S*)$/); if (!m) { hideSuggest(); return;