Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Editing Mode Lost When Canceling an Empty Message Edit #35650

Open
ishanmitra opened this issue Mar 29, 2025 · 2 comments
Open

Editing Mode Lost When Canceling an Empty Message Edit #35650

ishanmitra opened this issue Mar 29, 2025 · 2 comments

Comments

@ishanmitra
Copy link

ishanmitra commented Mar 29, 2025

Description:

When editing a message, if the user clears the message text entirely and then presses the Send button (or Enter key), a confirmation modal appears asking if they want to delete the message. If the user selects Cancel to prevent deletion, the composer incorrectly exits editing mode while restoring the previous message text. As a result, sending the restored text creates a new message instead of updating the original one.

This issue occurs only when the edited message is completely removed before pressing Send, leading to unintended message duplication and disrupting the expected editing workflow.

Steps to Reproduce:

  1. (Optional) Send a new message to any chatroom.
  2. Click Edit Message on an existing message.
  3. Clear the message text entirely.
  4. Press Send (Enter key) or click the send button.
  5. A warning modal appears with the message:

    "Are you sure? You will not be able to recover this message!"

    • Click Cancel to prevent accidental deletion.

Expected behavior:

When canceling an empty message edit, the Composer should remain in editing mode, and the message should either be restored to its previous content or left as an empty draft, allowing the user to continue editing without disruption.

Actual behavior:

After canceling an empty message edit, the Composer restores the previous message text but exits editing mode. Sending the restored text creates a new message instead of updating the original one.

Server Setup Information:

  • Version of Rocket.Chat Server: 7.5.0-develop
  • License Type: Starter
  • Number of Users: 1
  • Operating System: Ubuntu 22.04.5 LTS (WSL 2) (64-bit)
  • Deployment Method: yarn dsv
  • Number of Running Instances: 1
  • DB Replicaset Oplog: 8 MB
  • NodeJS Version: 22.13.1
  • MongoDB Version: 7.0.5

Client Setup Information

  • Desktop App or Browser Version: Microsoft Edge 134.0.3124.83 (Chromium 134.0.6998.118) (64-bit)
  • Operating System: Windows 11 Version 23H2 (Build 22631.4890)

Pull Requests

35653
35655
35656: Optimal and Minimal

Additional context

Screen.Recording.2025-03-29.194759.mp4
@DheerajRawandhe
Copy link

Hello @ishanmitra I want to work on this issue. Please assign it to me. Thank you

@ishanmitra
Copy link
Author

@DheerajRawandhe you don't need to be assigned to work on Rocket.Chat issues

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants