diff --git a/app/code/Magento/Catalog/view/adminhtml/web/js/product-gallery.js b/app/code/Magento/Catalog/view/adminhtml/web/js/product-gallery.js index c281e780d9173..81521e35b3692 100644 --- a/app/code/Magento/Catalog/view/adminhtml/web/js/product-gallery.js +++ b/app/code/Magento/Catalog/view/adminhtml/web/js/product-gallery.js @@ -1,6 +1,6 @@ /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. + * Copyright 2013 Adobe + * All Rights Reserved. */ /** @@ -355,6 +355,14 @@ define([ imageData.isRemoved = true; $imageContainer.addClass('removed').hide().find('.is-removed').val(1); + // Reset all image role/type selections to 'no_selection' value + // For each role (like base image, small image, etc.), clears both + // the UI select element and the internal types data structure + $.each(this.options.types, $.proxy(function (index, type) { + this.element.find('.image-' + type.code).val('no_selection'); + this.options.types[index].value = 'no_selection'; + }, this)); + this._contentUpdated(); },