Automattic / Automattic/simplenote-ios

Pasting text on a blank line inserts a new line before and after

Open
#548 4 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Swift
Stars
2.2k
Forks
297
Avg merge
13h 25m
Merged PRs (30d)
6

Description

### Expected
Pasting text should not add additional newlines.

### Observed
When I copy and paste a single word or sentence onto a newline in the middle of existing content, it inserts a blank line both before and after.

### Reproduced
> 1. Copy some text (from Simplenote or elsewhere) without any newlines.
> 2. Go to a note in Simplenote that has some content already.
> 3. Long press on a new line and paste. It's easiest to see if you do this right before or after existing content.
> 4. Observe that a new line gets added before and after pasted content.

Reproduced on latest beta (4.14.0.2) / iOS 13.2.3

Screenshots:

![IMG_1561](https://user-images.githubusercontent.com/52152/70190860-f7277b80-16ab-11ea-8a6f-53eb6fd0c226.PNG)
![IMG_1562](https://user-images.githubusercontent.com/52152/70190866-fbec2f80-16ab-11ea-9df1-f8477278d84c.PNG)
![IMG_1563](https://user-images.githubusercontent.com/52152/70190868-fdb5f300-16ab-11ea-8b8a-181f8906b48a.PNG)

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the paste behavior in the iOS app using the four steps in the issue, ideally with content before and after the blank line. Verify that pasting a single word or sentence does not add a newline before or after it, including near existing content.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.