Skip to content

Commit

Permalink
Feedback changes
Browse files Browse the repository at this point in the history
  • Loading branch information
konarshankar07 committed Feb 7, 2020
1 parent 727679d commit b41ea13
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions app/code/Magento/Ui/view/base/web/js/modal/prompt.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ define([
* Click handler.
*/
click: function (event) {
this.closeModal(event);
this.closeModal(event, true);
}
}]
},
Expand All @@ -75,7 +75,7 @@ define([
this.options.validation = this.options.validation && this.options.validationRules.length;
this._super();
this.modal.find(this.options.modalContent).append(this.getFormTemplate());
this.modal.find(this.options.modalCloseBtn).off().on('click', _.bind(this.closeModal, this, false));
this.modal.find(this.options.modalCloseBtn).off().on('click', _.bind(this.closeModal, this));

if (this.options.validation) {
this.setValidationClasses();
Expand Down Expand Up @@ -154,7 +154,9 @@ define([
*/
closeModal: function (event, result) {
var value;
if (result && !(result instanceof $.Event)) {
result = result || false;

if (result) {
if (this.options.validation && !this.validate()) {
return false;
}
Expand Down

0 comments on commit b41ea13

Please sign in to comment.