From 916da8be949a07637ee2af0f9449eb1d02d953a3 Mon Sep 17 00:00:00 2001 From: Yohan Boniface Date: Thu, 2 May 2024 17:11:52 +0200 Subject: [PATCH] fix: do not add title to button if content is a DOM node --- umap/static/umap/js/umap.core.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/umap/static/umap/js/umap.core.js b/umap/static/umap/js/umap.core.js index 79c4021d..156d15c7 100644 --- a/umap/static/umap/js/umap.core.js +++ b/umap/static/umap/js/umap.core.js @@ -98,7 +98,9 @@ L.DomUtil.createFieldset = (container, legend, options) => { L.DomUtil.createButton = (className, container, content, callback, context) => { const el = L.DomUtil.add('button', className, container, content) el.type = 'button' - el.title = content + if (!content.nodeType) { + el.title = content + } if (callback) { L.DomEvent.on(el, 'click', L.DomEvent.stop).on(el, 'click', callback, context) }