alvarotrigo / alvarotrigo/fullPage.js

scrollBar:true causes iframe to escape autoscrolling

Aberta
#2,693 19 comentários 0 reações 0 responsáveis Ver no GitHub
enhancement
Linguagem predominante
JavaScript
Estrelas
35.4k
Forks
7.1k
Métricas de merge de PRs
Nenhum PR com merge em 30d

Descrição

When browsing on iOS, with iframes on the page and scrollBar:true, if the scroll originates from within the iframe (i.e. the touch to scroll begins there) the normal Fullpage scrolling mechanism (autoScrolling and fitToSection) seems to be avoided.
Setting scrollBar:false works perfectly and as expected.

In a mobile device when scrollBar:true is enabled, scrolling from the iframe activates the browser's normal scrolling mechanism causing the address bar to hide, and after the bar is hidden, fullpage doesn't resize the section to fit the new height and so part of the next section appears at the bottom of the screen. Scrolling from anywhere else on the page doesn't cause the address bar to hide and so this problem doesn't appear.

This only happens with scrollBar:true. When it is set to false, if you try scrolling from the iframe only the section moves but springs back to its original place.

Is there a way to avoid this issue, without setting scrollBar:false?

Reproduced using by replacing the scrolling div with an iframe in the normalScrollElements.html example included in the project download. I had tried using codepen but it doesn't play well on my iOS devices. [link here](http://tingette.com/fullPage-examples/examples/iframe.html)

Tested on various iPads with Chrome browser (latest). Can also be seen in Safari but the height of the bar that hides is not much so the issue is not that obvious.

Guia de contribuição

Abrir o guia de contribuição

Avaliação

Esta issue ainda não foi avaliada.

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.