fix: Mentions popup remains open after canceling message edit

Merged
AL
8mo ago
+72-4

Proposed changes (including videos or screenshots)

This PR fixes an issue causing the composer's mentions popup to not close when canceling a message edit specifically by clicking on the "Cancel" button.

Before:
mention-popup-bug

After:
mention-popup-working

Issue(s)

CORE-1276

Steps to test or reproduce

  1. Navigate to any chat room.
  2. Send a normal message without any tags or special formatting.
  3. Locate the message you just sent and begin editing it.
  4. While in edit mode, type "@" in the message box to trigger the mentions tab.
  5. Cancel the message edit (β€œEsc”).
  6. Observe the mentions tab.

Further comments

Summary by CodeRabbit

  • Bug Fixes
    • Mention popup now closes reliably when canceling message edits (via Cancel button or Escape) and refreshes correctly if the edit content changes.
  • Tests
    • Added end-to-end tests covering message-edit cancellation and mention popup behavior to prevent regressions.