leaflet-search
leaflet-search copied to clipboard
Enter Button does not submit
Enter does not submit but collapses the search field.
This is the code:
case 13: if(this._countertips == 1) this._handleArrowSelect(1); this._handleSubmit(); break;
Why is it not working?
If i add this._handleSubmit();
for example to case 27 // Esc its working...
The reason seems to be that Leaflet itself catches the enter key and transforms it into a click event, see _handleDOMEvent
in leaflet source.
But I can see that this behavior has been removed in Leaflet 1.2. (I am on 1.0.3)
@kaio328 Does this reproduce for you in Leaflet 1.2?
I can confirm that this does not reproduce for me if I backport the 1.2 behavior to 1.0.3.