diff --git a/js/plugin/Routing.js b/js/plugin/Routing.js index 45463a2..32f1ae1 100644 --- a/js/plugin/Routing.js +++ b/js/plugin/Routing.js @@ -107,6 +107,10 @@ BR.Routing = L.Routing.extend({ } }, this._draw); + // keys not working when map container does not have focus, use document instead + L.DomEvent.removeListener(this._container, 'keyup', this._keyupListener); + L.DomEvent.addListener(document, 'keyup', this._keyupListener, this); + // enable drawing mode this.draw(true);