| @@ -1,4 +1,4 @@ | ||
| 1 | 1 | dialog.poly_dialog { |
| 2 | 2 | position: absolute; |
| 3 | 3 | left: 0; right: 0; |
| 4 | 4 | width: -moz-fit-content; |
| @@ -15,22 +15,22 @@ dialog { | ||
| 15 | 15 | display: block; |
| 16 | 16 | } |
| 17 | 17 | |
| 18 | 18 | dialog.poly_dialog:not([open]) { |
| 19 | 19 | display: none; |
| 20 | 20 | } |
| 21 | 21 | |
| 22 | 22 | dialog.poly_dialog + .backdrop { |
| 23 | 23 | position: fixed; |
| 24 | 24 | top: 0; right: 0; bottom: 0; left: 0; |
| 25 | 25 | background: rgba(0,0,0,0.1); |
| 26 | 26 | } |
| 27 | 27 | |
| 28 | 28 | ._dialog_overlay_poly_dialog_overlay { |
| 29 | 29 | position: fixed; |
| 30 | 30 | top: 0; right: 0; bottom: 0; left: 0; |
| 31 | 31 | } |
| 32 | 32 | |
| 33 | 33 | dialog.poly_dialog.fixed { |
| 34 | 34 | position: fixed; |
| 35 | 35 | top: 50%; |
| 36 | 36 | transform: translate(0, -50%); |
| @@ -562,7 +562,7 @@ dialogPolyfill.DialogManager = function() { | ||
| 562 | 562 | // actual implementation, the modal dialog stacking is controlled by the |
| 563 | 563 | // top layer, where z-index has no effect. |
| 564 | 564 | this.overlay = document.createElement('div'); |
| 565 | 565 | this.overlay.className = '_dialog_overlay_poly_dialog_overlay'; |
| 566 | 566 | this.overlay.addEventListener('click', function(e) { |
| 567 | 567 | this.forwardTab_ = undefined; |
| 568 | 568 | e.stopPropagation(); |
| @@ -179,7 +179,10 @@ export class Popup { | ||
| 179 | 179 | const template = document.querySelector('#popup_template'); |
| 180 | 180 | // @ts-ignore |
| 181 | 181 | this.dlg = template.content.cloneNode(true).querySelector('.popup'); |
| 182 | + if (!this.dlg.showModal) { | |
| 183 | + this.dlg.classList.add("poly_dialog"); | |
| 182 | 184 | dialogPolyfill.registerDialog(this.dlg); |
| 185 | + } | |
| 183 | 186 | this.body = this.dlg.querySelector('.popup-body'); |
| 184 | 187 | this.content = this.dlg.querySelector('.popup-content'); |
| 185 | 188 | this.mainInput = this.dlg.querySelector('.popup-input'); |