Hi,
I’ve got a behaviour of a Leaflet map, that’s strange.
I have a custom made poi list with a button to center and open the poi(‘s bubble). Everything working fine.
Unwanted: when the bubble or poi or map gets clicked, the page scrolls to the top, leaving the map half offscreen. Clicking a second time after scrolling back down a bit does not repeat the behaviour, so it seems related to the focus event.
This happens also anytime when the map gets focus after leaving it.
I found a most likely related thread on stackoverflow.
I would highly appreciate an option to programmatically stop this behaviour like e.g. a parameter noscroll in the MappressMap object.
As I understand the linked solution, there is a critical “moment” to apply a patch to the Leaflet API.
Since mappress loads the leaflet API and builds the map, I see no good chance to implement this solution myself. Please point me in the right direction, if I am wrong.
the happy mappres user
Dirk