Skip to content

Commit 86c860c

Browse files
committed
Make esc key return focus to leaflet container
1 parent e85ab92 commit 86c860c

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/mapml/features/featureGroup.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,9 @@ export var FeatureGroup = L.FeatureGroup.extend({
8282
} else if (!([9, 16, 13, 27, 49, 50, 51, 52, 53, 54, 55].includes(e.keyCode))){
8383
this._map.featureIndex.currentIndex = 0;
8484
this._map.featureIndex.inBoundFeatures[0].path.focus();
85+
} else if(e.keyCode === 27){
86+
this._map.featureIndex.currentIndex = 0;
87+
this._map._container.focus();
8588
}
8689

8790
if(e.target.tagName.toUpperCase() !== "G") return;

0 commit comments

Comments
 (0)