Leaflet map scrolls top on focus on Chrome

318 views
Skip to first unread message

Dan Cristian Salcianu

unread,
Dec 20, 2012, 7:40:55 AM12/20/12
to leafl...@googlegroups.com
Hi

I have an issue with Leaflet map.
The issue can be seen here also http://leafletjs.com/examples/quick-start-example.html
Make the browser window smaller so you have vertical scroll bars.
And scroll to bottom of page, so that you see the bottom of map and have vertical scroll.
The map must be out of focus.
Now when you focus the map by clicking it, issue is that the map scrolls top.

How can this event be prevented?

I made a trick with jQuery by saving the initial scrollTop and setting after that, but i don't like how it is working.

Thank you.

Dan Cristian Salcianu

unread,
Dec 20, 2012, 10:39:54 AM12/20/12
to leafl...@googlegroups.com
Fixed.

Must not be made focusable by adding option {keyboard: false}.

But one issue still remains.
I notice that on Chrome the scroll bars are not visible.
Reply all
Reply to author
Forward
0 new messages