From f070206da28f41814f6677ecee9ef4d84105338d Mon Sep 17 00:00:00 2001 From: Nazarn96 Date: Tue, 12 Nov 2019 11:05:27 +0200 Subject: [PATCH] The image details are not hidden when click on same image in the search result --- .../Ui/view/base/web/js/grid/columns/image-preview.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/code/Magento/Ui/view/base/web/js/grid/columns/image-preview.js b/app/code/Magento/Ui/view/base/web/js/grid/columns/image-preview.js index 1ef2ebf6594fa..8a22b06d53dc5 100644 --- a/app/code/Magento/Ui/view/base/web/js/grid/columns/image-preview.js +++ b/app/code/Magento/Ui/view/base/web/js/grid/columns/image-preview.js @@ -100,6 +100,12 @@ define([ */ show: function (record) { var img; + + if (record._rowIndex === this.lastOpenedImage() + && this.isVisible(record)) { + this.hide(); + return; + } this.hide(); this.displayedRecord(record);