alvarotrigo / alvarotrigo/react-fullpage

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

Offen
#178 5 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
reproduction required
Vorherrschende Sprache
JavaScript
Sterne
1.3k
Forks
172
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

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

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.