MDL-80593 core: Make Modal to work with Debug Template Info mode

This commit is contained in:
Huong Nguyen
2024-08-01 10:18:31 +07:00
parent e119a01a4f
commit ab84cbafd1
3 changed files with 19 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
+17 -1
View File
@@ -90,6 +90,22 @@ export default class Modal {
*/
static modalCounter = 0;
/**
* Getter method for .root element.
* @return {object} jQuery object
*/
get root() {
return $(this._root.filter(SELECTORS.CONTAINER));
}
/**
* Setter method for .root element.
* @param {object} root jQuery object
*/
set root(root) {
this._root = root;
}
/**
* Constructor for the Modal.
*
@@ -277,7 +293,7 @@ export default class Modal {
* @method attachToDOM
*/
attachToDOM() {
this.getAttachmentPoint().append(this.root);
this.getAttachmentPoint().append(this._root);
if (this.isAttached) {
return;