element-hq / element-hq/element-web

Issue with text replacement on mac

Open
#31,538 1 comment 0 reactions 0 assignees View on GitHub
A-Composer O-Uncommon S-Minor T-Defect X-Cannot-Reproduce Z-Platform-Specific
Dominant language
TypeScript
Stars
13.5k
Forks
2.8k
PR merge metrics
PR metrics pending

Description

### Steps to reproduce

The error involves the text replacement feature built into MacOS (I'm running Ventura 13.2); you need to have a text replacement rule set up before you can replicate the error.

To add a new text replacement rule:
1) open settings and go to 'Keyboard'
2) select 'Text Replacements...'
3) press the '+' in the bottom left corner of the dialog that appears
4) enter your replacement rules and click 'Add'

Screenshots:
Image
Image
Image
Image

To replicate the error:

1. Open element
2. Type your term to be replaced into the text box

### Outcome

#### What did you expect?
Here is a video of the expected behaviour in a unrelated text editor, followed by the error behaviour in Element.

https://github.com/user-attachments/assets/a29b3540-6b93-4f64-bacd-d5fbe15b6e8e

1. The text replacement rules automatically trigger when you press the space bar after enter a term from the list of 'Replace' terms

2. It removes the 'Replace' term (from the replacement rule) and inserts the 'With' term (from the replacement rule), followed by a space.

In other programs:
3a. After the replacement, the cursor ends up at the end of the new text, after the space

#### What happened instead?

In Element:
3b. After the replacement, the cursor ends up adjacent to the inserted 'With' term, before the space

#### This error is new as of a recent Element update. Prior to November 2025, text replacement worked as expected in Element.

### Operating system

Mac OS Ventura 13.2

### Application version

Element version: 1.12.6

### How did you install the app?

https://element.io/en/download

### Homeserver

matrix.org

### Will you send logs?

Yes

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.