From 745b96ea4629b7385f7eeae89a0de646c71b0beb Mon Sep 17 00:00:00 2001 From: Tim Abbott Date: Tue, 16 Aug 2022 14:34:11 -0700 Subject: [PATCH] compose: Fix enter returning user to preview mode. I'm not sure whether the bug this fixes was a regression resulting from d6d3683da00f7ce742227711355bc81ab029254e, or an old bug, but focusing the compose box is not sufficient to end preview mode; we should be calling the function that's explicitly for that. --- static/js/compose.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/static/js/compose.js b/static/js/compose.js index 100d08c355..cbe7084ba9 100644 --- a/static/js/compose.js +++ b/static/js/compose.js @@ -273,8 +273,8 @@ export function enter_with_preview_open() { // If enter_sends is enabled, we attempt to send the message finish(); } else { - // Otherwise, we return to the compose box and focus it - $("#compose-textarea").trigger("focus"); + // Otherwise, we return to the normal compose state. + clear_preview_area(); } }