Skip to content

Commit 1eb82e2

Browse files
Anshpreet8AnshpreetMalvoz
authored
Focus on Layer Menu Item or Link if Remove Button is clicked (#605)
* removed timeout before focusing * Update src/mapml/layers/MapLayer.js Co-authored-by: Robert Linder <[email protected]> Co-authored-by: Anshpreet <[email protected]> Co-authored-by: Robert Linder <[email protected]>
1 parent 4c420e0 commit 1eb82e2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/mapml/layers/MapLayer.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -439,7 +439,7 @@ export var MapMLLayer = L.Layer.extend({
439439
}
440440
mapEl.removeChild(e.target.closest("fieldset").querySelector("span").layer._layerEl);
441441
elem = elem ? root.querySelector(".leaflet-control-attribution").firstElementChild: elem = root.querySelectorAll('input')[fieldset];
442-
setTimeout(() => elem.focus(), 800); // a timeout is set so "pressed remove layer" is announced first
442+
elem.focus();
443443
}, this);
444444

445445
let itemSettingControlButton = L.DomUtil.create('button', 'mapml-layer-item-settings-control', layerItemControls);

0 commit comments

Comments
 (0)