Skip to content

Reply functionality broken when typing before clicking reply button #11

@BP602

Description

@BP602

Description

When a user types content in the chat input and then clicks the reply button on a message, the pre-typed content is not sent as a reply when Enter is pressed. Only subsequent messages typed after clicking reply are treated as replies.

Steps to Reproduce

  1. Type a message in the chat input (e.g., "Hello world")
  2. Click the reply button on any message in the chat
  3. Press Enter to send the message
  4. Expected: "Hello world" should be sent as a reply to the selected message
  5. Actual: "Hello world" is sent as a regular message or not sent at all

Root Cause

React state updates are asynchronous. When the reply button is clicked, setReplyInputData(data) is called, but if the user immediately presses Enter, the replyInputData state might still be null due to the async update timing.

Impact

  • Users cannot efficiently reply with pre-typed content
  • Confusing UX where reply behavior seems inconsistent
  • Workflow disruption for fast typists

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions