diff --git a/umap/static/umap/js/modules/ui/dialog.js b/umap/static/umap/js/modules/ui/dialog.js index ae72c2a5..f85b7d54 100644 --- a/umap/static/umap/js/modules/ui/dialog.js +++ b/umap/static/umap/js/modules/ui/dialog.js @@ -4,7 +4,8 @@ import { translate } from '../i18n.js' export default class Dialog { constructor(parent) { this.parent = parent - this.container = DomUtil.create('dialog', 'umap-dialog window', this.parent) + this.className = 'umap-dialog window' + this.container = DomUtil.create('dialog', this.className, this.parent) DomEvent.disableClickPropagation(this.container) DomEvent.on(this.container, 'contextmenu', DomEvent.stopPropagation) // Do not activate our custom context menu. DomEvent.on(this.container, 'wheel', DomEvent.stopPropagation) @@ -35,7 +36,7 @@ export default class Dialog { else this.container.show() if (className) { // Reset - this.container.className = 'umap-dialog' + this.container.className = this.className this.container.classList.add(...className.split(' ')) } const buttonsContainer = DomUtil.create('ul', 'buttons', this.container)