Skip to content

Commit f5140bc

Browse files
Merge remote-tracking branch '39680/2.4-develop' into comps_78764_2205
2 parents 7924c45 + 945f16d commit f5140bc

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

app/code/Magento/Catalog/view/adminhtml/web/js/product-gallery.js

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
2-
* Copyright © Magento, Inc. All rights reserved.
3-
* See COPYING.txt for license details.
2+
* Copyright 2013 Adobe
3+
* All Rights Reserved.
44
*/
55

66
/**
@@ -355,6 +355,14 @@ define([
355355
imageData.isRemoved = true;
356356
$imageContainer.addClass('removed').hide().find('.is-removed').val(1);
357357

358+
// Reset all image role/type selections to 'no_selection' value
359+
// For each role (like base image, small image, etc.), clears both
360+
// the UI select element and the internal types data structure
361+
$.each(this.options.types, $.proxy(function (index, type) {
362+
this.element.find('.image-' + type.code).val('no_selection');
363+
this.options.types[index].value = 'no_selection';
364+
}, this));
365+
358366
this._contentUpdated();
359367
},
360368

0 commit comments

Comments
 (0)