Fullpage.js: Mobile: cannot scroll up/down when fullpage.js in iFrame

Created on 7 Dec 2016  ·  11Comments  ·  Source: alvarotrigo/fullPage.js

Hi, the case is pretty specific: I use fullpage.js inside an iFrame. What I want is that when user swipes up/down on the iframe the parent page will be scrolled. May be you can advice something, thanks :)

playground: http://jsbin.com/tivibiq/1/edit?output

Steps to reproduce it

  1. open bin in touch device/emulator (I used chrome dev tools)
  2. try to swipe up touching the iframe. result: nothing happens
  3. try to swipe up touching black area outside iFrame. result: page is scrolling up

What I need is when you swipe the iFrame area page still scrolls.

question

Most helpful comment

The issue has been fixed on the dev branch.

All 11 comments

Related with https://github.com/alvarotrigo/fullPage.js/issues/2229
It is a browser's restriction I'm afraid. Nothing we can do for it.

Use autoScrolling:false or scrollBar:true or the options reponsiveWidth and responsiveHeight to fire autoScrolling:false in small screen devices.

Wow, so simple, thanks a lot. I just set autoScrolling:false and it works as I wanted. Actually I have only one section and a lot of horizontal slides
Now when I set autoScrolling:false I cannot swipe horizontally as well. Is there a way to prevent vertical autoScrolling but allow horizontal one?

I just set autoScrolling:false and it works as I wanted.

Isn't this contradicting this?

Now when I set autoScrolling:false I cannot swipe horizontally as well

well, I want to prevent vertical autoScroll but allow horizontal one

When user swipes up/down I don't want to intercept this event and allow normal scrolling on parent(host) page. When user swipes left/right I want to switch the slide accordingly.

I'm afraid there's nothing I can do there.
As I said this is a browser's security issue. Touch events don't get propagated to iframes.

The only solution is avoid using iframes.

I don't think this is about iframe.
If I set autoScrolling:true on a normal page(without iframe) where fullpage is not fit to the viewport I still cannot swipe up/down to scroll the page but can swipe left/right to change the active slide.
If I set autoScrolling:false then I can scroll vertically but cannot swipe left/right to change the slides.
Please let me know if should create another bin to demonstrate. Thanks.

Right. I'll create a new issue with this topic.
I was able to reproduce it in this demo page.

The issue has been fixed on the dev branch.

Great! Thanks a lot! Can I pull dev and use in my project or better wait until you merge into the master one?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

lunaandyou picture lunaandyou  ·  4Comments

piaomiao picture piaomiao  ·  5Comments

anonet1 picture anonet1  ·  3Comments

cavias picture cavias  ·  3Comments

sloyer picture sloyer  ·  3Comments