Skip to content

Commit

Permalink
fix: Threaded reply input does not immediately close (#9652)
Browse files Browse the repository at this point in the history
  • Loading branch information
Dschoordsch committed Apr 18, 2024
1 parent 4549c44 commit 9944ac0
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion packages/client/components/ThreadedReplyButton.tsx
Expand Up @@ -18,8 +18,14 @@ interface Props {

const ThreadedReplyButton = (props: Props) => {
const {onReply, dataCy} = props

const onClick = (e: React.MouseEvent<HTMLButtonElement>) => {
// stop propagating so the new reply is not immediately cancelled
e.stopPropagation()
onReply()
}
return (
<Reply data-cy={`${dataCy}-reply-button`} onClick={onReply}>
<Reply data-cy={`${dataCy}-reply-button`} onClick={onClick}>
Reply
</Reply>
)
Expand Down

0 comments on commit 9944ac0

Please sign in to comment.