MDL-77420 core: fix modal close button on remove on close

This commit is contained in:
Ferran Recio
2023-02-27 19:11:03 +01:00
parent 6458658400
commit e8bbcdae2c
3 changed files with 7 additions and 3 deletions
+1 -1
View File
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+5 -1
View File
@@ -853,7 +853,11 @@ define([
CustomEvents.define(this.getModal(), [CustomEvents.events.activate]);
this.getModal().on(CustomEvents.events.activate, SELECTORS.HIDE, function(e, data) {
this.hide();
if (this.removeOnClose) {
this.destroy();
} else {
this.hide();
}
data.originalEvent.preventDefault();
}.bind(this));