Skip to content

Conversation

@kfc35
Copy link

@kfc35 kfc35 commented Oct 16, 2025

First time contributor checklist:

Contributor checklist:

  • My contribution is not related to translations.
  • My commits are in nice logical chunks with good commit messages
  • My changes are rebased on the latest main branch
  • A pnpm run ready run passes successfully (more about tests here)
  • My changes are ready to be shipped to users

Description

When onBackspace occurs with the cursor at the beginning of a later line in a multiline message, it now short-circuits out to the default backspace handler. This prevents bespoke handling of emoji and mention deletions to erroneously be executed as described in #7513.

Fixes #7513

Testing Approach

Only manual testing was done on macOS 15.6.1 with a local pnpm start, filled with my production data.

  • I tested the scenario described in Multiline text with emoticon doesn't handle backspace correctly #7513 and verified expected behavior (the second new line was backspaced instead)
  • I tested an additional scenario with Test 1\n Test 2\n@usernameMention and also verified expected behavior (instead of an extra @ sign being inserted after backspacing, no extra @ was generated)
  • I tested macOS option-delete and verified that nothing changed.

I tried writing an automated test-electron test for the CompositionInput component, but got stuck on getting the quillRef to simulate events to. I think writing an automated test would include a refactoring of the component to expose it, or I am not savvy enough to figure it out, so I only went with my manual testing.

@kfc35 kfc35 changed the title Fix onBackspace handling of multiline messages with emojis or mentions Fix #7513: Fix onBackspace handling of multiline messages with emojis or mentions Oct 16, 2025
When onBackspace occurs with the cursor at the beginning of a line in a multiline message, it now shortcircuits out to the default backspace handler. This will prevent bespoke handling of emoji and mention deletions to erroneously be executed.
@kfc35 kfc35 force-pushed the 7513-fix-on-backspace branch from b35a643 to 5ba1b29 Compare October 23, 2025 20:10
@kfc35
Copy link
Author

kfc35 commented Oct 23, 2025

I just rebased my changes on the latest main branch after noticing there was a conflict.
I went through my manual tests and ensured that the solution works as intended.

pnpm run ready seems to no longer be passing successfully, but it seems unrelated to my change — running it on main by itself also currently fails for me locally now.

@ayumi-signal ayumi-signal self-assigned this Oct 23, 2025
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

Successfully merging this pull request may close these issues.

Multiline text with emoticon doesn't handle backspace correctly

2 participants