Make dialog css edits dependant on polyfil

This commit is contained in:
QuantumEntangledAndy
2024-10-04 16:57:59 +07:00
parent 3e465d155c
commit bd48c2445a
3 changed files with 10 additions and 7 deletions

View File

@ -179,7 +179,10 @@ export class Popup {
const template = document.querySelector('#popup_template');
// @ts-ignore
this.dlg = template.content.cloneNode(true).querySelector('.popup');
dialogPolyfill.registerDialog(this.dlg);
if (!this.dlg.showModal) {
this.dlg.classList.add("poly_dialog");
dialogPolyfill.registerDialog(this.dlg);
}
this.body = this.dlg.querySelector('.popup-body');
this.content = this.dlg.querySelector('.popup-content');
this.mainInput = this.dlg.querySelector('.popup-input');