Automattic / Automattic/simplenote-macos

Line duplication in UI when hitting backspace

Open
#1,207 2 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Swift
Stars
1.6k
Forks
172
Avg merge
11h 17m
Merged PRs (30d)
3

Description

When writing a text at line > 1, and then hitting backspace on the first line, the last line in the text gets duplicated in the UI.

### Expected

The line gets deleted, and the text goes up by one line.

### Observed

The last line in the text gets duplicated (in the UI, selecting and deleting the text itself happens only on one line)

https://github.com/user-attachments/assets/631557a1-2b6b-4561-9949-2a373c57c5e6

### Reproduced

* Create a new not
* Hit return a couple of times
* Write some inspirational mantras like "Hello world", or even "Hi!"
* Go to line number 2 (so, it should be an empty line)
* Hit backspace
* 💥 (or 💥 💥, actually )

Contributor guide

Open the contributing guide

Research direction

Start by following the reproduction steps in the issue in the macOS app, focusing on the text editor's backspace handling when the cursor is on an empty second line. Trace the UI update and deletion behavior for that action. Done means the line is deleted, the remaining text moves up, and the last line is not duplicated in the UI.

Written by the indexing model from the issue text.

Assessment

Tech stack
swift
Domain
desktop
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
58/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.