From 2527b04cbe29054e9740c5e9634bb9ab0769cadf Mon Sep 17 00:00:00 2001 From: Oleh Usik Date: Mon, 17 Feb 2020 22:05:59 +0200 Subject: [PATCH] Other element would receive the click issue was fixed --- .../Swatches/Test/Mftf/Section/AdminManageSwatchSection.xml | 1 + .../Test/AdminCheckColorUploadChooserVisualSwatchTest.xml | 6 +++--- app/code/Magento/Swatches/view/adminhtml/web/js/visual.js | 4 ++-- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/app/code/Magento/Swatches/Test/Mftf/Section/AdminManageSwatchSection.xml b/app/code/Magento/Swatches/Test/Mftf/Section/AdminManageSwatchSection.xml index c3ef0a7324bfd..f18de49761533 100644 --- a/app/code/Magento/Swatches/Test/Mftf/Section/AdminManageSwatchSection.xml +++ b/app/code/Magento/Swatches/Test/Mftf/Section/AdminManageSwatchSection.xml @@ -17,6 +17,7 @@ + diff --git a/app/code/Magento/Swatches/Test/Mftf/Test/AdminCheckColorUploadChooserVisualSwatchTest.xml b/app/code/Magento/Swatches/Test/Mftf/Test/AdminCheckColorUploadChooserVisualSwatchTest.xml index 96142636c30b9..7582444671f92 100644 --- a/app/code/Magento/Swatches/Test/Mftf/Test/AdminCheckColorUploadChooserVisualSwatchTest.xml +++ b/app/code/Magento/Swatches/Test/Mftf/Test/AdminCheckColorUploadChooserVisualSwatchTest.xml @@ -26,8 +26,8 @@ - - - + + + diff --git a/app/code/Magento/Swatches/view/adminhtml/web/js/visual.js b/app/code/Magento/Swatches/view/adminhtml/web/js/visual.js index 782dc2938a335..848e02bbea6a8 100644 --- a/app/code/Magento/Swatches/view/adminhtml/web/js/visual.js +++ b/app/code/Magento/Swatches/view/adminhtml/web/js/visual.js @@ -403,8 +403,8 @@ define([ /** * Toggle color upload chooser */ - $(document).on('click', '.swatch_window', function () { - var currentElement = $(this).next('div'); + $(document).on('click', '.swatches-visual-col', function () { + var currentElement = $(this).find('.swatch_sub-menu_container'); jQuery('.swatch_sub-menu_container').not(currentElement).hide(); currentElement.toggle();