alvarotrigo / alvarotrigo/react-fullpage

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

未关闭
#178 5 条评论 0 个 reaction 已指派 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 摘要。