From b747b347f43fb61cecf975af0e1227725a3a3435 Mon Sep 17 00:00:00 2001 From: Yohan Boniface Date: Fri, 14 Jun 2024 20:45:17 +0200 Subject: [PATCH] fix: dialog class should have "window" class to get propert buttons --- umap/static/umap/js/modules/ui/dialog.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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)