Focus map after sidebar close (#114)
to be consistent with Leaflet Controls and EasyButton behaviour; removes focus outline in Firefox from tab that would else remain there
This commit is contained in:
parent
607659317f
commit
54dfa93624
1 changed files with 4 additions and 0 deletions
|
|
@ -26,6 +26,10 @@ BR.Sidebar = L.Control.Sidebar.extend({
|
|||
this.on('closing', this._notifyOnClose, this);
|
||||
this.on('toggleExpand', this._notifyOnResize, this);
|
||||
|
||||
this.on('closing', function () {
|
||||
this._map.getContainer().focus();
|
||||
}, this);
|
||||
|
||||
this._rememberTabState();
|
||||
|
||||
if (L.Browser.touch && BR.Browser.touchScreenDetectable && !BR.Browser.touchScreen) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue