Skip to content

Commit b41ea13

Browse files
Feedback changes
1 parent 727679d commit b41ea13

File tree

1 file changed

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

1 file changed

+5
-3
lines changed

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

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ define([
6262
* Click handler.
6363
*/
6464
click: function (event) {
65-
this.closeModal(event);
65+
this.closeModal(event, true);
6666
}
6767
}]
6868
},
@@ -75,7 +75,7 @@ define([
7575
this.options.validation = this.options.validation && this.options.validationRules.length;
7676
this._super();
7777
this.modal.find(this.options.modalContent).append(this.getFormTemplate());
78-
this.modal.find(this.options.modalCloseBtn).off().on('click', _.bind(this.closeModal, this, false));
78+
this.modal.find(this.options.modalCloseBtn).off().on('click', _.bind(this.closeModal, this));
7979

8080
if (this.options.validation) {
8181
this.setValidationClasses();
@@ -154,7 +154,9 @@ define([
154154
*/
155155
closeModal: function (event, result) {
156156
var value;
157-
if (result && !(result instanceof $.Event)) {
157+
result = result || false;
158+
159+
if (result) {
158160
if (this.options.validation && !this.validate()) {
159161
return false;
160162
}

0 commit comments

Comments
 (0)