register key listener on document instead of map container (needs focus)
This commit is contained in:
parent
7098cd2cf3
commit
a078bc24f0
1 changed files with 4 additions and 0 deletions
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue