Make dialog css edits dependant on polyfil

bd48c2445a70e5321fbcaf4fb5923efb1aef4b98

QuantumEntangledAndy <sheepchaan@gmail.com>

Signed
3 files changed, +9 -6Showing whitespace changes
public/lib/dialog-polyfill.css+5 -5
@@ -1,4 +1,4 @@
11dialog.poly_dialog {
22 position: absolute;
33 left: 0; right: 0;
44 width: -moz-fit-content;
@@ -15,22 +15,22 @@ dialog {
1515 display: block;
1616}
1717
1818dialog.poly_dialog:not([open]) {
1919 display: none;
2020}
2121
2222dialog.poly_dialog + .backdrop {
2323 position: fixed;
2424 top: 0; right: 0; bottom: 0; left: 0;
2525 background: rgba(0,0,0,0.1);
2626}
2727
2828._dialog_overlay_poly_dialog_overlay {
2929 position: fixed;
3030 top: 0; right: 0; bottom: 0; left: 0;
3131}
3232
3333dialog.poly_dialog.fixed {
3434 position: fixed;
3535 top: 50%;
3636 transform: translate(0, -50%);
public/lib/dialog-polyfill.esm.js+1 -1
@@ -562,7 +562,7 @@ dialogPolyfill.DialogManager = function() {
562562 // actual implementation, the modal dialog stacking is controlled by the
563563 // top layer, where z-index has no effect.
564564 this.overlay = document.createElement('div');
565565 this.overlay.className = '_dialog_overlay_poly_dialog_overlay';
566566 this.overlay.addEventListener('click', function(e) {
567567 this.forwardTab_ = undefined;
568568 e.stopPropagation();
public/scripts/popup.js+3 -0
@@ -179,7 +179,10 @@ export class Popup {
179179 const template = document.querySelector('#popup_template');
180180 // @ts-ignore
181181 this.dlg = template.content.cloneNode(true).querySelector('.popup');
182+ if (!this.dlg.showModal) {
183+ this.dlg.classList.add("poly_dialog");
182184 dialogPolyfill.registerDialog(this.dlg);
185+ }
183186 this.body = this.dlg.querySelector('.popup-body');
184187 this.content = this.dlg.querySelector('.popup-content');
185188 this.mainInput = this.dlg.querySelector('.popup-input');