-
Notifications
You must be signed in to change notification settings - Fork 27
Open
Description
When auto-collapsing is used, when the user clicks on a result, the box is left open. It should be auto-closed, as the user has made a definitive decision and the action is complete.
I have created a workaround, but this is unsatisfactory because it force-clears the input:
// Auto-close on select; see: https://maplibre.org/maplibre-gl-geocoder/classes/default.html#on
geocoder.on ('result', function () {
document.querySelector ('.maplibregl-ctrl-geocoder--button').click (); // Click to remove the search value
document.querySelector ('.maplibregl-ctrl-geocoder--input').blur (); // Move away from the search box
});
I tried using the _collapse method, which seems to be advertised as public despite the underscore, but this had no effect, as I see its internal implementation ignores the call if there is focus.
Metadata
Metadata
Assignees
Labels
No labels