Skip to content
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

backButtonClose={true}下,点击安卓物理返回键回退好几个页面。 #276

Open
Han3Jim opened this issue Jul 10, 2019 · 0 comments

Comments

@Han3Jim
Copy link

Han3Jim commented Jul 10, 2019

backButtonClose={true} 时,如果遮罩层是打开状态,点击安卓物理返回键会关闭它。
但是带来一个问题,某页面使用了ModalBox,如果重来没让它弹出来过,那么按物理返回键回到上页面,是正常到。只要在改页面弹出过ModalBox(无论是点击背景让它关闭还是点击返回键关闭),然后点击物理返回键页面会回退好几个页面。

问题很怪异,之前用ModalBox都没出现过这个问题,也可能跟公司RN框架有冲突。

提此问题,希望能帮助到遇到同样问题的人,作者也可以看看backButtonClose实现是否有问题。

解决方法: 去掉backButtonClose,或者backButtonClose={false},如果需要点击物理返回键关闭ModalBox,可以通过监听安卓物理返回键来判读ModalBox是否是打开的,自己手动关闭。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant