alvarotrigo / alvarotrigo/react-fullpage

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

オープン
#178 コメント 5 件 リアクション 0 件 担当者 0 名 GitHub で見る
reproduction required
主要言語
JavaScript
スター
1.3k
フォーク
172
PR マージ指標
30日以内にマージされた PR はありません

説明

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

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。