StackExchange / StackExchange/Stacks-Editor

bug(rich-text) Pasting text from one list into another inserts as sub-bullet

Open
#164 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug mode - markdown mode - rich text
Dominant language
TypeScript
Stars
437
Forks
61
Avg merge
16h 2m
Merged PRs (30d)
8

Description

Describe the bug
Copying text from one list bullet to another inserts the pasted text as a new sub-bullet.

To Reproduce

  1. in rich text mode, add list items
  2. copy one of them, or even a fragment of one (not the entire text from the list item)
  3. paste it into a different list item
  4. observe that it pastes as a sublist item, on the next level

Expected behavior
List items are pasted in as text. Copying multiple list items and pasting them in should be equivalent to pasting in multiple lines of text (this is how it works in Google Docs). Pasting in one list item or a fragment of one list item should just add it as text to the spot where it is being pasted.

Screenshots

Desktop (please complete the following information):

  • Windows Chrome 103
  • MacOs Firefox

Additional context
MSE Post

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in the rich text mode and reproduce the issue by copying a list item or fragment into another list item. Check the paste handling involved and compare single-item, fragment, and multiple-item pastes with the expected plain-text and multiple-line behavior. Done means pasted content no longer becomes an unintended sublist.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
frontend
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.