alvarotrigo / alvarotrigo/react-fullpage

overflow : "hidden" remain trough view even if react-fullpage is not included in them

Ouverte
#178 5 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
reproduction required
Langage dominant
JavaScript
Étoiles
1.3k
Forks
172
Métriques de merge des PR
Aucune PR mergée en 30 j

Description

### Description
I'm using react-fullpage in my Home component ONLY, but when i change to a different view (using react-router) the overflow: "hidden" remains on my body tag and it makes my views not scrollable.
If i reload the view manually (by other pressing the reload button or F5) it works and remove the overflow : "hidden" .

My react-router is not wrapped by the reactfullpage.js wrapper, only my home component is wrapped by it.

### Link to isolated reproduction with no external CSS / JS
[Ideally in [codesandbox.io](https://codesandbox.io/s/m34yq5q0qx), links to personal websites won't be reviewed unless isolated. Reported issues without a reproduction might get closed.]

### Steps to reproduce it
1. Use react-fullpage in what ever page component
2. Switch page
3. overflow : hidden remains on the body tag...

I even tried
` React.useEffect(() => {
return function cleanup(){
console.log("cleanup ")
document.body.style.overflowY = "auto !important";
document.body.style.overflowX = "auto !important";
}
}, [])`

but it doesnt work... (I tried changing background inside this cleanup function and it does work.)

### Versions
I have the latest version of React and React-fullpage

Guide de contribution

Ouvrir le guide de contribution

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.