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