sanity
sanity copied to clipboard
Unable to use cropping/hotspot tool in Safari
Describe the bug When trying to use the cropping button on images in Safari, the modal just disappears without any errors. Works fine in Chrome, Edge.
To Reproduce Create a hero widget like this:
export default defineField({
title: 'Hero Widget',
name: `heroWidget`,
type: 'object',
fields: [
defineField({
title: "Bilder",
name: "images",
type: "array",
of: [
defineArrayMember({
title: "Bilde",
name: "image",
type: "image",
options: {
hotspot: true,
},
fields: [
{
name: "alt",
type: "string",
title: "Alternativ tekst",
},
]
})
]
})
]
})
Then use the hero widget in a widget list component:
export default defineField({
title: 'Widgets',
name: `widgets`,
type: 'array',
options: {
sortable: true,
},
of: [
defineArrayMember(HeroWidget),
],
});
Then use the widget list in a document:
export default defineType({
type: "document",
title: `Dynamisk Side`,
name: `dynamicPage`,
fields: [
defineField({
...widgetList,
title: "Widgets",
name: "widgets",
}),
],
});
Expected behavior
It should open the cropping tool, like in other browsers
Screenshots
Which versions of Sanity are you using?
@sanity/cli (global) 3.42.1 (latest: 3.58.0) @sanity/document-internationalization 3.0.1 (up to date) @sanity/image-url 1.0.2 (up to date) @sanity/language-filter 4.0.2 (up to date) @sanity/orderable-document-list 1.2.2 (up to date) @sanity/preview-url-secret 1.6.21 (up to date) @sanity/react-loader 1.10.7 (up to date) @sanity/table 1.1.2 (up to date) @sanity/ui 2.8.9 (up to date) @sanity/vision 3.57.4 (latest: 3.58.0) sanity 3.57.4 (latest: 3.58.0)
What operating system are you using?
Which versions of Node.js / npm are you running?
10.7.0 v22.1.0
Seems like the same issue I submitted with #7351
@azzlack You might want to try again with the most recent version of Sanity Studio. My issue #7351 was resolved with 3.68.0.
Just confirming that I still have this issue in Safari (Chrome/Firefox work) with something like this:
{
name: 'images',
title: 'Images',
type: 'array',
of: [
{
type: 'image',
options: {
hotspot: true,
},
},
],
},
Example:
https://github.com/user-attachments/assets/8aaf9045-da97-44dd-8870-7e6231118de6