-
Notifications
You must be signed in to change notification settings - Fork 27
Open
Description
Currently, when the widget is added to the map, and the user hovers over the search button, the input field is uncollapsed, but the user has to give focus manually by clicking in the input field. This seems unnecessary, given that the user intention will almost always be to want to start typing.
It would therefore be useful to have a focus/autofocus option to add autofocus.
For now, the following workaround will do this:
// Add auto-focus to the widget
document.querySelector ('.maplibregl-ctrl-geocoder').addEventListener ('mouseenter', function () {
document.querySelector ('.maplibregl-ctrl-geocoder--input').focus ();
});
Metadata
Metadata
Assignees
Labels
No labels