Merge pull request #1792 from umap-project/fix-title-html
fix: do not add title to button if content is a DOM node
This commit is contained in:
commit
8679c0ded8
1 changed files with 3 additions and 1 deletions
|
@ -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)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue