Skip to content

initCollapsed causes blocks to collapse in the middle of editing #12056

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
mvarendorff2 opened this issue Apr 9, 2025 · 0 comments
Open

initCollapsed causes blocks to collapse in the middle of editing #12056

mvarendorff2 opened this issue Apr 9, 2025 · 0 comments
Labels
created-by: Contributor status: needs-triage Possible bug which hasn't been reproduced yet

Comments

@mvarendorff2
Copy link
Contributor

Describe the Bug

Setting initCollapsed: true on a blocks field causes the blocks to collapse while editing (after the debounce period) if the entity has not been saved yet.

Link to the code that reproduces this issue

https://github.com/mvarendorff2/payload-initcollapsed-repro

Reproduction Steps

  1. Clone, install and start the project
git clone [email protected]/mvarendorff2/payload-initcollapsed-repro.git
cd payload-initcollapsed-repro
pnpm install
pnpm dev
  1. Open Payload, create a new user and log in
  2. Start creating a new object in the Pages collection
  3. Add a new Example Block to the blocks section (starts collapsed which is as expected)
  4. Open it and start typing in the Foo-field
  5. Take a half second to think what you want to type next
  6. The block collapses right when you want to start typing again :(

Which area(s) are affected? (Select all that apply)

area: ui

Environment Info

Binaries:
  Node: 22.14.0
  npm: N/A
  Yarn: N/A
  pnpm: N/A
Relevant Packages:
  payload: 3.31.0
  next: 15.2.3
  @payloadcms/email-nodemailer: 3.31.0
  @payloadcms/graphql: 3.31.0
  @payloadcms/next/utilities: 3.31.0
  @payloadcms/payload-cloud: 3.31.0
  @payloadcms/richtext-lexical: 3.31.0
  @payloadcms/translations: 3.31.0
  @payloadcms/ui/shared: 3.31.0
  react: 19.0.0
  react-dom: 19.0.0
Operating System:
  Platform: win32
  Arch: x64
  Version: Windows 11 Home
  Available memory (MB): 32213
  Available CPU cores: 22
@mvarendorff2 mvarendorff2 added status: needs-triage Possible bug which hasn't been reproduced yet validate-reproduction Auto-added tag on create to tell bot to check recreation URL, removed after check. labels Apr 9, 2025
@github-actions github-actions bot added created-by: Contributor and removed validate-reproduction Auto-added tag on create to tell bot to check recreation URL, removed after check. labels Apr 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
created-by: Contributor status: needs-triage Possible bug which hasn't been reproduced yet
Projects
None yet
Development

No branches or pull requests

1 participant