Skip to content

Commit

Permalink
ENGCOM-7752: Remove over complicated setup for closing minicart dropd…
Browse files Browse the repository at this point in the history
…own #28906

 - Merge Pull Request #28906 from lumnn/magento2:feature-remove-close-sidebar
 - Merged commits:
   1. 1cb5685
  • Loading branch information
magento-engcom-team committed Jul 28, 2020
2 parents 48d7868 + 1cb5685 commit 4f7e659
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 16 deletions.
14 changes: 0 additions & 14 deletions app/code/Magento/Checkout/view/frontend/web/js/view/minicart.js
Original file line number Diff line number Diff line change
Expand Up @@ -123,20 +123,6 @@ define([
$('[data-block="minicart"]').find('[data-role="dropdownDialog"]').dropdownDialog('close');
},

/**
* @return {Boolean}
*/
closeSidebar: function () {
var minicart = $('[data-block="minicart"]');

minicart.on('click', '[data-action="close"]', function (event) {
event.stopPropagation();
minicart.find('[data-role="dropdownDialog"]').dropdownDialog('close');
});

return true;
},

/**
* @param {String} productType
* @return {*|String}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,12 @@
id="btn-minicart-close"
class="action close"
data-action="close"
data-bind="attr: { title: $t('Close') }">
data-bind="
attr: {
title: $t('Close')
},
click: closeMinicart()
">
<span translate="'Close'"/>
</button>

Expand Down Expand Up @@ -74,7 +79,6 @@

<ifnot args="getCartParam('summary_count')">
<strong class="subtitle empty"
data-bind="visible: closeSidebar()"
translate="'You have no items in your shopping cart.'"
/>
<if args="getCartParam('cart_empty_message')">
Expand Down

0 comments on commit 4f7e659

Please sign in to comment.