Issue with auto-save triggering frequently in Sanity.io blog setup.

3 replies
Last updated: Mar 21, 2024
Hi all! It’s been a while since I’ve initiated a new project, so I wanted to try that today by just using the
npm create sanity@latest
command and start from scratch. I went for the blog setup, and I’m experiencing that when I want to write in fields of type block or text, it triggers the auto-save very frequently, and every time the saving is done it removes the active state from the field and I have to click on it to start typing again. Since I’ve only initiated the project and done nothing else I figured I should ask in here if this is a known bug or if I need to do any additional config to change this setting? Thank you in advance!
AI Update

This is definitely not expected behavior! The issue you're describing—where autosave triggers frequently and removes focus from the field you're typing in—is a known performance regression that affected several Studio versions, particularly around v3.56.0.

Based on this GitHub issue, several users reported the exact same problem: laggy typing, especially noticeable when typing quickly or holding backspace, with the issue being particularly bad in Portable Text (block) fields and objects nested within them. The good news is that the Sanity team has been actively working on fixes for this.

Here's what you can try:

1. Update to the latest Studio version

The Sanity team released performance improvements after v3.56.0 specifically targeting this typing lag issue. Make sure you're on the latest version:

npm install sanity@latest

Then restart your dev server. There were significant rendering performance improvements released in subsequent versions that should help with this.

2. Temporary workaround: Downgrade to v3.50.0

If you're completely blocked and the latest version still has issues, you can temporarily downgrade to v3.50.0, which was confirmed by the Sanity team to not have this regression:

npm install sanity@3.50.0

3. Clear cache and reinstall

Sometimes a fresh install can help:

rm -rf node_modules package-lock.json
npm install

4. Check your environment

  • Make sure you're on Node.js 20+ (required for Studio v4, which you'd get with npm create sanity@latest)
  • Try in a different browser to rule out browser-specific issues or extensions interfering

5. Check if it's specific to certain field types

The issue was reported to be worse in:

  • Portable Text (block) fields
  • Objects nested within Portable Text
  • Text fields in general, but especially when typing quickly

If it's only happening in specific fields, that's helpful diagnostic info.

What was causing this?

The issue was related to rendering performance and how the Studio handles component re-renders during autosave. The autosave itself shouldn't cause focus loss—that's the bug. The Sanity team identified and fixed the reconciliation logic that was causing unnecessary re-renders.

Since you're using a fresh blog template with no custom plugins, this is definitely the known issue rather than something specific to your setup. The fact that you're experiencing it right after running npm create sanity@latest suggests you might have gotten a version that had the regression.

If the problem persists after updating, please report back with your exact sanity version from package.json, and consider opening a new issue on the Sanity GitHub repo if the latest version still has the problem. The team was very responsive to this issue when it was first reported.

We’re experiencing the same issue
Upgrading sanity to 3.35.2 fixed it
Perfect, just saw the release notes. Thanks!

Sanity – Build the way you think, not the way your CMS thinks

Sanity is the developer-first content operating system that gives you complete control. Schema-as-code, GROQ queries, and real-time APIs mean no more workarounds or waiting for deployments. Free to start, scale as you grow.

Was this answer helpful?