Fix for iPad, where el.tagName was undefined when clicking on labels.
This commit is contained in:
parent
1f6533d0f5
commit
d78fb49943
@ -62,7 +62,7 @@ L.Draggable = L.Class.extend({
|
||||
el = first.target;
|
||||
|
||||
// if touching a link, highlight it
|
||||
if (L.Browser.touch && el.tagName.toLowerCase() === 'a') {
|
||||
if (L.Browser.touch && el.tagName && el.tagName.toLowerCase() === 'a') {
|
||||
L.DomUtil.addClass(el, 'leaflet-active');
|
||||
}
|
||||
|
||||
|
@ -66,7 +66,7 @@ L.Map.Tap = L.Handler.extend({
|
||||
var first = e.changedTouches[0],
|
||||
el = first.target;
|
||||
|
||||
if (el.tagName.toLowerCase() === 'a') {
|
||||
if (el && el.tagName && el.tagName.toLowerCase() === 'a') {
|
||||
L.DomUtil.removeClass(el, 'leaflet-active');
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user