Skip to content

Commit d6995f7

Browse files
Fixed issue with prompt closed on pressing escape key instead of hiding
1 parent c42d48a commit d6995f7

File tree

1 file changed

+4
-4
lines changed
  • app/code/Magento/Ui/view/base/web/js/modal

1 file changed

+4
-4
lines changed

app/code/Magento/Ui/view/base/web/js/modal/prompt.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,10 +73,10 @@ define([
7373
* close modal window
7474
* @param {Object} event - event
7575
*/
76-
escapeKey: function () {
77-
if (this.options.isOpen && this.modal.find(document.activeElement).length ||
78-
this.options.isOpen && this.modal[0] === document.activeElement) {
79-
this._close();
76+
escapeKey: function (event) {
77+
if (this.modal.find(document.activeElement).length ||
78+
this.modal[0] === document.activeElement) {
79+
this.closeModal();
8080
}
8181
}
8282
}

0 commit comments

Comments
 (0)