Merge pull request #2970 from QuantumEntangledAndy/bug/modalPolyfilCenter
Center the crop popup on change, when polyfilled
This commit is contained in:
commit
357c2e0756
|
@ -182,6 +182,14 @@ export class Popup {
|
|||
if (!this.dlg.showModal) {
|
||||
this.dlg.classList.add('poly_dialog');
|
||||
dialogPolyfill.registerDialog(this.dlg);
|
||||
// Force a vertical reposition after the content
|
||||
// (like crop image) has been set
|
||||
const resizeObserver = new ResizeObserver((entries) => {
|
||||
for (const entry of entries) {
|
||||
dialogPolyfill.reposition(entry.target);
|
||||
}
|
||||
});
|
||||
resizeObserver.observe(this.dlg);
|
||||
}
|
||||
this.body = this.dlg.querySelector('.popup-body');
|
||||
this.content = this.dlg.querySelector('.popup-content');
|
||||
|
|
Loading…
Reference in New Issue