Skip to content

Commit 12f1b5f

Browse files
committed
Ignore Cloudinary selections if dialog closed
Fix #616
1 parent 2802d1d commit 12f1b5f

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

src/lib/components/assets/browser/select-assets-dialog.svelte

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -442,6 +442,14 @@
442442
{multiple}
443443
hidden={libraryName !== 'cloudinary'}
444444
onSelect={(resources) => {
445+
// Check if the dialog is open to prevent selected resources from being inserted to
446+
// other fields. This is required because `CloudinaryPanel` uses messaging to
447+
// communicate with the embedded iframe, which is shared by all fields using the
448+
// Cloudinary media storage.
449+
if (!open) {
450+
return;
451+
}
452+
445453
// Close the dialog after selection
446454
selectedResources = resources;
447455
onOk();

0 commit comments

Comments
 (0)