alvarotrigo / alvarotrigo/fullPage.js

.fp-viewing-section1 applied to body before .fp-viewing-sectionX on Firefox/Chrome

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

Descrição

Hi there,

First of all, as everyone here, I'd like to thank you for all the awesome work on this fantastic plugin.
It's really well designed and easy to work with.

I fiddled around in vain trying to resolve an issue I've been having on the project I'm currently working on, but can't seem to find why it does what it does.

So what it does is, when landing directly on a section through a refresh or an external link resembling _coolweb.com/index.php/en/#sectionX_, the class **.fp-viewing-section1** is applied to the body for a very short instant before its counterpart **.fp-viewing-sectionX**.
This causes a brief animation of the various objects that have a different aspect when **.fp-viewing-section1** is active. I guess it wouldn't be noticeable if I didn't modify any elements' size/position between section1 and sectionX.

This issue is present and cumbersome when animateAnchor is set to false, because when set to true it makes sense that we actually land on the first section before moving to the linked one.

Some additional info if that helps :
- everything works fine on Safari where the .fp-viewing-sectionX is applied instantly (or so it seems)
- the parameters of fullPage-init.js are inside a $(document).ready(function(){...});
- the scripts are loaded at the end of the index.php in the following order : bootstrap > scrolloverflow > fullPage > fullPage-init

I'm considering using a preloader screen to work around this issue.

I could try to make an isolated reproduction if necessary, but I think you can get the feel of what it does. Tell me if you think it's needed though.

I hope I'm not too much in the bush with this issue and the solution is not somewhere in the FAQ, ha!

Cheers

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.