Reply To: confusing Leaflet scrollTop on focus

Home Forums MapPress Support confusing Leaflet scrollTop on focus Reply To: confusing Leaflet scrollTop on focus

#19414
Chris
Keymaster

Hi,

Funny, I never noticed that behavior until you pointed it out.  It seems to be a long-standing a Leaflet bug/feature, and it’s discussed here:

https://github.com/Leaflet/Leaflet/issues/4125

The best approach is to get Leaflet to patch their behavior.  You can also try this approach from stackoverflow, which has no timing dependency (‘mapp0’ is the first map on the screen):

jQuery(document).ready(function() {
  mapp0.getMap().getContainer().focus = ()=>{};
})

If that doesn’t work, I can add a workaround to MapPress, and it will be included in the next major release.  Please use the contact form to email me for info on testing this functionality.