alvarotrigo / alvarotrigo/react-fullpage

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

Aperta
#178 5 commenti 0 reazioni 0 assegnatari Vedi su GitHub
reproduction required
Lingua principale
JavaScript
Stelle
1.3k
Fork
172
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

### 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

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.