Skip to content

Commit

Permalink
compose: Focus message input on quote-and-reply
Browse files Browse the repository at this point in the history
Fixes-partly: zulip#5718
  • Loading branch information
chrisbobbe committed Apr 25, 2023
1 parent 6dc7aae commit 7d29b58
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/compose/ComposeBox.js
Original file line number Diff line number Diff line change
Expand Up @@ -442,6 +442,7 @@ const ComposeBox: React$AbstractComponent<Props, ImperativeHandle> = forwardRef(
} finally {
setActiveQuoteAndRepliesCount(v => v - 1);
activeInvocations.current = activeInvocations.current.filter(x => x !== serialNumber);
messageInputRef.current?.focus();
}
},
[
Expand All @@ -452,6 +453,7 @@ const ComposeBox: React$AbstractComponent<Props, ImperativeHandle> = forwardRef(
setMessageInputValue,
zulipFeatureLevel,
_,
messageInputRef,
],
);
useImperativeHandle(ref, () => ({ doQuoteAndReply }), [doQuoteAndReply]);
Expand Down

0 comments on commit 7d29b58

Please sign in to comment.