Closed docjojo closed 4 years ago
This issue now also affects desktop Chrome since Leaflet 1.6.0.
The reason is that L.Browser.touch
is now undefined
(tested with Chromium 80 on Ubuntu 18.04), so this condition for the default expand
option is false:
Therefore it falls back to the mouseover/out
handling, that somehow doesn't work properly.
Since Leaflet 1.6.0 the definition of L.Browser.pointer
has changed to include !webkit
(PR #6855), which might get reverted (#6977). And the touch
flag depends on the pointer
flag.
The original difference with Safari probably was, that it has only been starting to support PointerEvents since last September, so now all main desktop browsers do.
Before Leaflet 1.6.0, L.Browser.touch
has been true
for all main desktop browsers, so I think that test doesn't really make sense anymore and can probably be removed?
Great, thank you for the fix. Just downloaded the new version and tested, with Chrome, but no luck. The list still disappears once I move the mouse. Even in the demo, leaflet-control-geocoder-1.12.0=>demo=>index.html
Any ideas?
Correction:
I did the same changes in the source I downloaded from https://unpkg.com/leaflet-control-geocoder/dist/Control.Geocoder.js and your changes work fine! Just didn't realize, that this change has not been published yet.
Great to hear that my fix works for you - have you tested both Chrome and Safari?
Just was going to write, that my pull request #272 from yesterday hasn't been merged and released yet and that version 1.12.0 is unrelated to this issue. What apparently has been fixed is that the result list didn't close when selecting a result on a touch iOS device with collapsed: false
(#271) - sort of the opposite problem to this one.
Yes, I can confirm, that this change works on both, Chrome and Safari on my mac. Thank you!
Search field diappears in Safari
Hello,
when I enter a search string and press return, I get a result list. Moving the mouse over one of the results will hide the result list though – so no way to select a result. Works fine in Firefox and Chrome, but not in Safari (all on a Mac). Any idea?
https://www.liedman.net/leaflet-control-geocoder/
Regards Chris