Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Search box collapses on click anywhere, including in the search box, with recent browsers and default settings #205

Closed
Hoolean opened this issue Jul 12, 2018 · 0 comments

Comments

@Hoolean
Copy link

Hoolean commented Jul 12, 2018

Problem

Clicking anywhere in the search box, not just on the search icon, will collapse the search box with default settings. This is an issue, as actions such as deselecting text and clicking to reposition within it that should not blur the input field are collapsing it.

Reproducing

I could reproduce this bug on Chromium v66 and Firefox v61, with leaflet-control-geocoder v1.5.8. Notably, I could not reproduce the issue with leaflet-control-geocoder v1.5.7.

  1. Clone the gh-pages demo and put leaflet v1.3.1 and leaflet-control-geocoder v1.5.8 in place
  2. Click in the search box and type anything
  3. Click anywhere on anything you have just typed
  4. The search box collapses; it should not

Further Pointers

The issue appeared to be that mouse/pointer/touch events were reaching the outer control container instead of the inner input element. Adding an event.preventPropagation() to the inner <input> tag appeared to mitigate the issue on some level.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant