Go Behind the Experience to see how Tecovas brings the West to life with Sanity 🤠 July 18th

Bug with focus in the studio when clicking on certain fields in a complex schema.

14 replies
Last updated: Jan 8, 2021
Jumpy focus in the studio! This is odd and very, very annoying: we have a relatively complex schema with 22 fields, some of them inside 3 fieldsets of which 2 are collapsed by default. Clicking title/description of some of those fields will make Studio focus the very first title input and scroll to the top. I have disabled some of our customizations and still see this odd behaviour.
Dec 21, 2020, 2:13 PM
I believe the “focus on first feel when uncollapsing a fieldset” bug was squashed in a update pushed on friday.
Dec 21, 2020, 2:21 PM
I did
sanity upgrade
just before asking, just in case.. Is that update out now?
Dec 21, 2020, 3:19 PM
this open PR might fix this issue https://github.com/sanity-io/sanity/pull/2200
Dec 24, 2020, 9:30 AM
I hope that will solve things, thank you
user B
. Not 100% sure since by description it's only about portable text fields being activated but we see the problem on regular string fields too.. 🤞
Jan 3, 2021, 10:06 PM
I’m experiencing the same bug and this issue from
user A
seems related: https://github.com/sanity-io/sanity/issues/2112
Jan 5, 2021, 4:56 AM
new release is out, might be fixed now 🤞
Fix bug where form would scroll to top when first focusing a child of a nested field.
https://github.com/sanity-io/sanity/releases/tag/v2.1.4
Jan 6, 2021, 10:17 AM
Yep, we’re no longer seeing this bug after upgrading to v2.1.4 🎉
Jan 7, 2021, 12:34 PM
🎉
Jan 7, 2021, 12:39 PM
🎉
Jan 7, 2021, 12:39 PM
Yep, we’re no longer seeing this bug after upgrading to v2.1.4 🎉
Jan 7, 2021, 12:34 PM
🎉
Jan 7, 2021, 12:39 PM
Sorry, still an issue here for some specific clicks..I have two fieldsets collapsed by default, clicking the title of a field in the second one will focus the first input at the top of the page instead of the one I want.
This is worse because some of those controls in that fieldset are radio buttons. Users naturally expect to be able to click the title of the radio button's label to toggle it - instead focus jumps to the top.
Jan 8, 2021, 7:31 PM
It seems to be an issue for all documents where we have more than one fieldset. The fieldset the studio renders last in the document will have focus issues.
(There is a minor bug also if you click the label of a control which is inside a fieldset when the focus is in a control outside that fieldset - the focus first jumps briefly to the first control inside the fieldset, causing a bit of jerk and potentially upward scrolling, then it jumps to the field you want focus in)
Jan 8, 2021, 7:32 PM
sanity versions
says everything is up to date
Jan 8, 2021, 7:33 PM

Sanity– build remarkable experiences at scale

Sanity is a modern headless CMS that treats content as data to power your digital business. Free to get started, and pay-as-you-go on all plans.

Was this answer helpful?