Joint session with Vercel: How to build intelligent storefronts (May 15th)

Sanity Studio rich text link URL input closes/flickers when clicked

10 repliesLast updated: Dec 2, 2025

Hey Everyone! New to Sanity, so I hope this isn't a stupid question. Has anyone encountered an issue where I want to add an external link URL in a rich text field inside the Sanity studio, but the box which asks for entering the URL just closes when I click inside it? When I click the edit link pencil icon it just flickers (disappears and then appears again). After much trial and error across many browsers I finally managed to insert a link by accessing the studio in chrome on a mobile device - but that still required dozens of attempts to write inside the field, and it's a pain in the... I don't understand the problem beyond it complaining about 3rd party cookies (even when they're enabled) and websocket closing before a handshake. Does this work normally for y'all or is it a known issue? I feel like I'm the only idiot in the room, but otherwise I set up everything correctly, even the portableText configuration for rendering inside the Next.js app. But since this happens inside the studio I didn't know where else to look since I don't understand any of the code there.
AI Update

This is definitely not a stupid question - what you're describing sounds incredibly frustrating, and I want to help you get to the bottom of it!

First, let me be upfront: the specific issue you're experiencing (popover closing when clicking inside the URL field, flickering edit icon) isn't something I can find documented as a known issue in Sanity's official documentation. However, the symptoms you're describing - especially the third-party cookie warnings and websocket errors - point to some likely culprits.

What Could Be Happening

The fact that you're seeing third-party cookie warnings and websocket closing before handshake errors is significant. These suggest that something in your browser environment is interfering with how Sanity Studio communicates with Sanity's backend services. The Studio needs to maintain connections to Sanity's APIs for real-time features and authentication, and restrictive browser settings can break these connections in unexpected ways.

The popover closing immediately when you try to interact with it could be a symptom of these connection issues causing focus/state management problems in the Studio UI.

Things to Try

1. Browser Privacy Settings

Since you mentioned third-party cookies specifically, start here:

2. Browser Extensions

Ad blockers and privacy extensions can interfere with Studio functionality:

3. Network Environment

The websocket errors suggest potential network-level blocking:

4. Keyboard Navigation Workaround

While troubleshooting, try this alternative approach:

This sometimes bypasses focus management issues that clicking triggers.

5. Update Sanity Studio

Make sure you're running the latest version:

npm update sanity

If you're on Studio v4, ensure you're using Node.js 20+ as that's a requirement.

6. Clear Cache and Restart

Sometimes corrupted browser state causes UI issues:

Your Schema Is Probably Fine

Since you mentioned that portable text rendering works correctly in your Next.js app, your schema configuration is almost certainly correct. The Block Content structure you've set up is working - this is purely a Studio UI interaction issue, not a configuration problem.

Next Steps If Nothing Works

If you've tried all the above without success:

The fact that it eventually worked on mobile Chrome (even if painfully) strongly suggests this is a browser-specific issue rather than a fundamental problem with your setup. You're not an idiot - you've actually done great troubleshooting by testing across multiple browsers and finding a workaround!

Start with the browser privacy settings and extension checks - those are the most common causes of the symptoms you're describing. Good luck, and I hope you get it sorted!

Show original thread
10 replies

Was this answer helpful?

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.

Related contributions