Skip to content

Blocks field: block added while form state is still syncing renders empty (header only, no fields) #18638

Open

Description

@graiparrot

Payload version: 3.90.2 (Next.js 16.3.3, @payloadcms/db-postgres, admin language German)

If a block is added while the debounced form-state request triggered by a previous keystroke is still pending, the new block renders with its header only and without any fields. It stays empty until reload. Reliably reproducible in a production build (next build && next start) when adding a block immediately after typing in another field.

Steps to reproduce:

  1. Open a collection with a blocks field in a production build.
  2. Type into the title field and immediately (within the debounce window) click "Add block" and pick a block.

Actual: the block row appears without fields.

Expected: the new block's fields render regardless of pending form-state requests.

Possibly related: #17375 (pasted block row renders blank until refresh). Probable cause is the form-state response for the earlier request overwriting the state that contains the new row.

How we found it: axe-core (tags wcag2a, wcag2aa, wcag21a, wcag21aa, wcag22aa) via @axe-core/playwright plus keyboard-only tests of the admin. Our tests wait until no request is pending before adding a block.

Happy to help with a PR if the direction is agreed.

Activity

  1. dharshni1518 commented on Oct 10, 2026

    @dharshni1518

    Hi, I'd like to take this issue for my open-source contribution sprint. I'll start by reproducing the production-build case and tracing how the pending form-state response interacts with the newly added block.

    My proposed scope is a focused synchronization fix with a deterministic regression test that delays the earlier response, adds a block, and checks that its fields become editable without reloading or losing typed values. I'll also check the overlap with #18425 and the earlier pasted-block work before implementing.

    Please let me know if someone is already working on this, or if you have a preferred direction or target branch. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions