iframe scrolling on map div

5794
14
12-01-2015 12:11 PM
AndrewFarrar
Occasional Contributor

Hello,

I have a question that is probably more general web dev related than javascript api related, but I figured this would be the place to start.  I have a small javascript app that I am integrating into our webpage CMS through an iframe.  I've disabled the map pan and zoom functions in javascript so that users can't interact with the map other than click on the polygons to take them to another webpage.  My issue comes with viewing this webpage on a mobile device.  Whereas a user will typically swipe upward on a phone to scroll the page down, this functionality seems to be disabled when the user tries to swipe over the map div.  interestingly enough, if the user swipes over any of the other divs, (logo, button, title), it will scroll just fine.  I would like the user to be able to scroll over the entire page, including everything in the iframe.  I thought it might have something to do with content overflow in the iframe, so I tried setting the iframe in a div and styling that to:

overflow: hidden;

That didn't work either.  Has anyone else experienced this behavior with esri map divs?

edit:

here is the link to the iframed page:

Frederick County : Testmappage

0 Kudos
14 Replies
ChrisSmith7
Frequent Contributor

I created a mock-up with the object embedded on a simple HTML page... I tried swipe scrolling emulating an iPhone in Chrome... the issue remains.

0 Kudos
TyroneBiggums
Occasional Contributor III

Well, we gave it the ol' college try. I would have definitely have blamed iframes alone.

I'm out of ideas but I'm going to still follow this in case I ever need to tackle this.

0 Kudos
AndrewFarrar
Occasional Contributor

Thanks for the help and suggestions everyone!  I didn't have any luck with the embed and object tags either.  The only way I could get the swiping to work was disabling the mouse-events on the div that the iframe sits within.  Of course that renders the app completely useless.  I'll keep the forum posted if I come across any other solutions/workarounds

0 Kudos
ChrisSmith7
Frequent Contributor

I wonder - could you try self-hosting the API and digging-in to see if the API is doing something funky when you disable panning/zooming? Maybe you could create a custom fix...

0 Kudos
TyroneBiggums
Occasional Contributor III

Have either of you tried embedding another, lighter, website instead of the map? Maybe try to jam google.com in there to confirm that it's actually the API? I can't remember if this was mentioned.