Skip to content

Commit 596503a

Browse files
committed
#39481: Completely removing a gallery-image from be keeps scope roles/types set (base/small/thumbnail) and after re-adding "old" roles/types appear
- fixed issue with "old" roles/types after re-adding images
1 parent 89b4e2e commit 596503a

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -355,6 +355,11 @@ define([
355355
imageData.isRemoved = true;
356356
$imageContainer.addClass('removed').hide().find('.is-removed').val(1);
357357

358+
$.each(this.options.types, $.proxy(function (index, type) {
359+
this.element.find('.image-' + type.code).val('no_selection');
360+
this.options.types[index].value = 'no_selection';
361+
}, this));
362+
358363
this._contentUpdated();
359364
},
360365

0 commit comments

Comments
 (0)