Skip to content

Clicking Publish during an autosave does nothing #19363

Open

Description

@adrian-baker

Describe the Bug

With autosave on, a click on Publish changes does nothing while an autosave is in flight, and nothing tells the editor. FormSubmit disables the button during background processing, which #11343 added so a publish couldn't overlap an autosave (#6648). With a 100 ms autosave interval, an editor who types and then clicks Publish can hit this. #17455 doesn't fix it.

Link to the code that reproduces this issue

https://github.com/adrian-baker/payload/blob/5e94b4daf98a274c6034febc4e9321b9e60fb7d8/test/versions/e2e.spec.ts#L441

The Publish during an autosave tests fail without the fix.

Reproduction Steps

In test/versions, on the autosave-posts collection:

  1. Open a published document.
  2. In Playwright, hold the document's autosave PATCH requests.
  3. Change the title, and wait for the autosave to be held.
  4. Click Publish changes.

Expected: the document publishes with the new title once the autosave is released. Actual: the button is disabled, so the click does nothing.

Which area(s) are affected?

area: ui

Environment Info

main at 138e51688e: Payload 4.0.0-beta.7, Next.js 16.4.2, React 19.3.1, Node.js 24.22.1

🤖 Generated with Claude Code

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

    BugPayload OSSarea: ui

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions