Leflet map in iframe: page scrolls down to bottom on first click on map
See original GitHub issueHi I have noticed an annoying problem when I embed a leaflet into a iframe. On my mobile iphone 5 the page scrolls down to the bottom on the first click on the map.
The thing is easily reproducible but only appears in mobile phones, web works fine.
surf to this page with your phone and test http://ext.dn.se/qs/widgets/test/iframeTest2.html
Or make a testpage like
<iframe id="test" style=" height:400px; width:100%;" scrolling="no" frameborder="0" src="http://leafletjs.com/examples/mobile/example.html"></iframe>
Issue Analytics
- State:
- Created 7 years ago
- Reactions:2
- Comments:18 (7 by maintainers)
Top Results From Across the Web
Leaflet Map is Zooming out too far - Stack Overflow
When I scroll out, I can't get the map region to be locked to one Earth. That is, when I scroll out all...
Read more >Leaflet in map iFrame scroll issue - Google Groups
The problem is that when a user scrolls down on a touch device the page scrolls but as soon as the scrolling reaches...
Read more >Leaflet map scrolled when dragging the page on mobile [closed]
I have a Leaflet map embedded in a div with vertical scroll. ... I scroll the page (touching outside the map) the map...
Read more >Creating, hosting, and publishing Leaflet maps with qgis2web ...
This workshop will not cover how to create the geospatial data or host images in web maps. However, some bonus sections at the...
Read more >Making an Interactive Web Application with R and Shiny
An interactive map with an adjustable timeline is, in some cases, ... using iframes: see the Mapping the Gay Guides project for one...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
With the latest version of leaflet if you set keyboard:false in the options of Leaflet, the bug is gone, as previously the focus() was called because of the initialized hook, but now it isn’t anymore, so while the bug still kinda exists, it is not that painful
A version of Leaflet 1.0.3 incorporating this patch has been deployed at https://www.havochvatten.se/hav/samordning--fakta/havsplanering/havsplaner/forslag-till-havsplaner/vagledning-om-mest-lamplig-anvandning.html.
It works well for us so would recommend merging the proposed patch. I’ll put up a PR.