Automattic / Automattic/simplenote-macos

Pasting additional text into tag editor results in two tags creation

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

Description

The reason for the issue lies in the fact that the tag pasted from the clipboard submits the tag.

For the record, pasting text into tags editor in Electron does not submit a tag.

### Expected
If there's an existing text in the tag editor, and the user pastes additional text into the tag, the pasted text should be appended to the existing one.

### Observed
Instead of being appended, two tags are submitted: with the previously existing text, and with the pasted text:

https://user-images.githubusercontent.com/73365754/128510073-96ebd0d8-27a4-4127-971c-a46b2b28de9f.mov

### Reproduced
1. Create a new note
2. Place `text1` into the clipboard (just a single word for simplicity)
3. Start entering `text2` in tag editor, and then paste `text1` ~> this action will create `text2` and `text1` tags

Make|Model|macOS Version|App Version
-|-|-|-
Apple|MBP 16"|11.3.2|2.14 (11239)

Contributor guide

Open the contributing guide

Research direction

Reproduce the issue in the macOS tag editor using the listed text1/text2 steps, then trace the editor's paste handling to see why pasted text submits the existing tag. Done means pasting additional text appends it to the current tag and creates only one tag, matching the expected behavior.

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
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.