commit 83511ecc55f39ac62abfbba9442d5040e24f625f
parent 758d448f34ded5f7f5c28046177575513774c53e
Author: Sergej Orlov <wladimirych@gmail.com>
Date: Thu, 24 Aug 2017 23:27:28 +0300
[track list] stop point edit on esc key down instead of up event to avoid editing stop when canceling name dialog
Diffstat:
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/lib/leaflet.control.track-list/track-list.js b/src/lib/leaflet.control.track-list/track-list.js
@@ -579,7 +579,7 @@ L.Control.TrackList = L.Control.extend({
L.DomUtil.addClass(this._map._container, 'leaflet-point-placing');
this.isPlacingPoint = true;
this.map.on('click', this.movePoint.bind(this, marker));
- L.DomEvent.on(document, 'keyup', this.stopPlacingPointOnEscPressed, this);
+ L.DomEvent.on(document, 'keydown', this.stopPlacingPointOnEscPressed, this);
this.fire('startedit');
},
@@ -593,7 +593,7 @@ L.Control.TrackList = L.Control.extend({
L.DomUtil.addClass(this._map._container, 'leaflet-point-placing');
this.isPlacingPoint = true;
this.map.on('click', this.createNewPoint.bind(this, track));
- L.DomEvent.on(document, 'keyup', this.stopPlacingPointOnEscPressed, this);
+ L.DomEvent.on(document, 'keydown', this.stopPlacingPointOnEscPressed, this);
this.fire('startedit');
},