Skip to content

Bug: CollapsibleContainer crashes when you press Shift + Enter #8530

Description

@levensta

Lexical version: 0.44

Steps To Reproduce

  1. Insert Collapsible Container
  2. Press Shift + Enter within the container's content

Link to code example: https://playground.lexical.dev/#doc=H4sIAAAAAAAAE9VTzU7DMAx-FeRzmDpWMZYH4Dyp3BCHrDFbJC-uXHdQTX13lG5oXZGQUDnAKbEtfz92cgT0QVkKdYpgjyDMms5yF8gLRrDPo8CjukBgMwOvLHun_XXPHsFCTBkCA7W2lBJgQPFdwcLaiduKq3Yp1Vap2FcMHFDqwBHsvHsx4INgqX0cG6ILS8IK0WM8MZ4xqgHsBejE-njRl8LiU1NnvjP4K26fghL-Aac_pymZyFV12BDe6tnFQPf16KbBlxw1lScOZgzpQkQZDYmrpFelwS_Ln_ygbzZI_PYvl91_9yupnQFytRbugB7sfLlcLe6y1eL-IcsN1NxImfrW5NqtcBP9sBuyWZ7PMug-ABxYbVFXBAAA

The current behavior

  • Pressing Shift + Enter does not insert a line break and causes an error to be logged in the console
  • If you press Enter, a new paragraph is created at the end of the document
Screen.Recording.2026-05-21.at.02.48.19.mov

The expected behavior

  • Pressing Shift + Enter correctly inserts a line break
  • Pressing Enter creates a paragraph inside CollapsibleContent

Impact of fix

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions