Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
romanovma opened this issue Dec 7, 2016 · 11 comments
Closed

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

romanovma opened this issue Dec 7, 2016 · 11 comments
Labels

Comments

@romanovma
Copy link

romanovma commented Dec 7, 2016

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.

@alvarotrigo
Copy link
Owner

alvarotrigo commented Dec 7, 2016

Related with #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.

@romanovma
Copy link
Author

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?

@alvarotrigo
Copy link
Owner

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

@romanovma
Copy link
Author

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

@romanovma
Copy link
Author

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.

@alvarotrigo
Copy link
Owner

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.

@romanovma
Copy link
Author

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.

@alvarotrigo
Copy link
Owner

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

@alvarotrigo
Copy link
Owner

Opened #2447

@alvarotrigo
Copy link
Owner

The issue has been fixed on the dev branch.

@romanovma
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants