Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Backport] Fix for #14593 (second try #16431) #17223

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions app/code/Magento/Checkout/view/frontend/web/js/sidebar.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,10 @@ define([
confirm: function () {
self._removeItem($(event.currentTarget));
},
always: function (event) {
event.stopImmediatePropagation();

/** @inheritdoc */
always: function (e) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you describe why this code was added? I can't find this change in original PR.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, just in order to be the same across all release lines. It's a good idea.

e.stopImmediatePropagation();
}
}
});
Expand Down
5 changes: 3 additions & 2 deletions app/code/Magento/Ui/view/base/web/js/modal/modal.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,11 +100,12 @@ define([
/**
* Escape key press handler,
* close modal window
* @param {Object} event - event
*/
escapeKey: function () {
escapeKey: function (event) {
if (this.options.isOpen && this.modal.find(document.activeElement).length ||
this.options.isOpen && this.modal[0] === document.activeElement) {
this.closeModal();
this.closeModal(event);
}
}
}
Expand Down