element-hq / element-hq/element-x-android

Extra spacing inserted in Line breaks and lists on Element X Android

Open
#5,190 5 comments 2 reactions 0 assignees View on GitHub
A-Event Rendering O-Occasional S-Minor T-Defect
Dominant language
Kotlin
Stars
2.4k
Forks
624
Avg merge
1d 14h
Merged PRs (30d)
149

Description

### Steps to reproduce

### Summary

Element X (Android) inserts **extra blank lines / excessive vertical spacing** between paragraphs and within both unordered and ordered lists.
This happens even when the message contains **no empty lines**. The same message renders correctly (no extra spacing) in **Element Classic**, **Element Web**, and **Element Desktop (Windows)**.

This is a **regression**: Element X **25.03.0** rendered the same messages correctly; newer versions (e.g. **25.08.3**) show the issue.

---

### Affected version

- Element X Android: **25.08.3** (current) — affected

For reference: The issue is **not present** in Element X 25.03.0 (messages rendered largely correctly there).
It is also **not reproducible** in Element Classic (Android), Element Web, or Element Desktop (Windows).
Only newer versions of Element X are affected.

---

### Steps to reproduce

1. On Element X (Android), compose and send the following message **without** any empty lines:
```md
Paragraph one line 1
Paragraph one line 2
- Bullet A
- Bullet B
1. First
2. Second
Final line without an empty line before it
```

2. View the sent message in Element X and compare with Element Classic / Element Web / Element Desktop.

---

### Screenshots

I will attach the following for comparison.
Each screenshot shows the **same message**, rendered in different clients/versions:

1: (affected) — Element X (Android) 25.08.3

![Image](https://github.com/user-attachments/assets/acc65031-5886-48e0-b5c1-31ff23af6c58)

2: (acceptable) — Element X 25.03.0

![Image](https://github.com/user-attachments/assets/72f86597-90cc-4251-b89e-7f26e5a0cd10)

3: (OK, as I expect it to be) — Element Classic (Android)

![Image](https://github.com/user-attachments/assets/aed2a6b3-0ce5-4a81-86f2-3fd22de197af)

4: (OK) — Element Desktop (Windows)

Image

---

### Workarounds

Currently, the only workaround is to use an older version.
I am personally staying on **Element X 25.03.0**, since this version still renders paragraphs and lists correctly.

### Outcome

### Expected behavior

- The message is rendered **without** additional blank lines.
- Line breaks remain single line breaks.
- Lists (`-`, `*`, and `1.`) are rendered **compactly**, consistent with Element Classic/Web/Desktop.

---

### Actual behavior

- Element X inserts **extra vertical spacing** so that paragraphs and each list item appear as if there were **blank lines** between them.
- The layout is not aligned with Element Classic/Web/Desktop and reduces readability.

### Your phone model

Samsung Note 20 Ultra 5G, Samsung A52s 5G

### Operating system version

Android 13, Android 14

### Application version and app store

Element X, Playstore, Version 25.08.3

### Homeserver

Homeserver: matrix.techniverse.net, Version 1.136.0

### Will you send logs?

No

### Are you willing to provide a PR?

No

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.