Skip to content

Multi-line bullet list creation causes list splitting and item duplication #3280

@mdeclercq

Description

@mdeclercq

Describe the bug
When creating a bullet list from a multi-line text selection, adding items manually to the list creates multiple lists and generates duplicate list items.

Git bisect shows this issue was introduced in commit c4aa81 (release v9.44.0).

To Reproduce

  1. Go to the Rooster demo: https://microsoft.github.io/roosterjs
  2. Input 2 lines of text in the editor
line 1
line 2
  1. Select all the text and click on the bullet list icon
  2. Focus the end of line 2
  3. Add a new line by pressing Enter
  4. Type line 3
  5. Notice that 2 separate ul list elements are created, one containing line 1 and another one containing line 2 and line 3
  6. Press Enter again, the list item line 3 gets duplicated

Expected behavior

  • A single ul list remains containing 3 items li
  • List items are not duplicated when pressing enter

Screenshots
Image

Device Information

  • OS: MacOS 26.1
  • Browser : Chrome 143.0.7499.170

Additional context

Screen.Recording.2026-02-06.at.10.07.28.mov

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions