diff --git a/src/dom/Draggable.js b/src/dom/Draggable.js index fb451b93..65b2ae01 100644 --- a/src/dom/Draggable.js +++ b/src/dom/Draggable.js @@ -92,7 +92,7 @@ L.Draggable = L.Class.extend({ this._startPos = L.DomUtil.getPosition(this._element).subtract(offset); L.DomUtil.addClass(document.body, 'leaflet-dragging'); - L.DomUtil.addClass(e.target, 'leaflet-drag-target'); + L.DomUtil.addClass((e.target || e.srcElement), 'leaflet-drag-target'); } this._newPos = this._startPos.add(offset); @@ -110,7 +110,7 @@ L.Draggable = L.Class.extend({ _onUp: function (e) { L.DomUtil.removeClass(document.body, 'leaflet-dragging'); - L.DomUtil.removeClass(e.target, 'leaflet-drag-target'); + L.DomUtil.removeClass((e.target || e.srcElement), 'leaflet-drag-target'); for (var i in L.Draggable.MOVE) { L.DomEvent