fix: do not add title to button if content is a DOM node
This commit is contained in:
parent
bb47299cfa
commit
916da8be94
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) => {
|
L.DomUtil.createButton = (className, container, content, callback, context) => {
|
||||||
const el = L.DomUtil.add('button', className, container, content)
|
const el = L.DomUtil.add('button', className, container, content)
|
||||||
el.type = 'button'
|
el.type = 'button'
|
||||||
el.title = content
|
if (!content.nodeType) {
|
||||||
|
el.title = content
|
||||||
|
}
|
||||||
if (callback) {
|
if (callback) {
|
||||||
L.DomEvent.on(el, 'click', L.DomEvent.stop).on(el, 'click', callback, context)
|
L.DomEvent.on(el, 'click', L.DomEvent.stop).on(el, 'click', callback, context)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue