New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Drawer and overflow: 'scroll', causing Google Chrome, mobile Google Chrome white screen #24209
Comments
help |
可以啊,你说完我就重新下载了一下,可以跑 |
去掉 |
不是解决方案是有的,解决方案目前是将overflow: 'scroll' 改为overflow: 'hidden',不知原因 |
猜测是drawer组件内部的动画导致的白屏,但是发现跟浏览器也有一定关系,谷歌的浏览器(手机,电脑)都存在问题,火狐就没有问题 |
至少保留一个body 100%宽的元素 |
跟这个没有关系吧,我改了width: '100%',提交了代码 没有任何变化,切换浏览器tab窗口同样会造成白屏,我需要一些组件内部造成这个白屏的原因(深层的),不是表面现象
|
自己定位到原因了,是node_modules/_rc-drawer@3.2.0@rc-drawer/es/DrawerChild.js中,使用到了如下两条语句 document.body.scrollHeight;document.body.style.touchAction = 'none';
` |
现在还能重现么? |
ping @mybraveheart |
没有反馈,先关了,如果还有问题可以回复,我会 reopen。 |
Reproduction link
https://github.com/mybraveheart/react-test
Steps to reproduce
npm start 启动项目,打开谷歌浏览器,打开控制台,以手机模式调整分辨率为iphone6/7/8 plus的,刷新浏览器,在数字跳到2时,鼠标左键点击灰色区域,3秒后出现白屏,手机谷歌浏览器打开后,在数字跳到2时,鼠标左键点击灰色区域,3秒后出现白屏。备注:如果接口调用频繁,会间断性的出现白屏现象,拖动控制台可以恢复。
What is expected?
期望不出现白屏或者闪烁的现象。
What is actually happening?
手机谷歌浏览器或者电脑谷歌浏览器白屏。
业务场景是在做drawer侧滑窗口时,打开窗口,切换窗口内部按钮,改筛选条件会调用setState,发现每点击几次就会出现白屏的现象,最后定位精简了一下代码,发现只需要设置几个属性便会重现,不知道白屏的原因是?解决方案目前是将overflow: 'scroll' 改为overflow: 'hidden',不知原因。附代码。useRequest通过mock设置延迟,第一个接口2秒返回,第二个接口5秒返回。
`
`
The text was updated successfully, but these errors were encountered: