1
0
mirror of https://github.com/moodle/moodle.git synced 2025-03-26 18:42:40 +01:00

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

This commit is contained in:
Ferran Recio 2023-02-27 19:04:05 +01:00
parent a31f5830bd
commit c91c4b39e9
3 changed files with 7 additions and 3 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -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));