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

全屏处理后,Select组件不显示弹出框 #4764

Closed
doter1995 opened this issue Feb 6, 2017 · 2 comments
Closed

全屏处理后,Select组件不显示弹出框 #4764

doter1995 opened this issue Feb 6, 2017 · 2 comments

Comments

@doter1995
Copy link

Environment(required)

  • antd version:1.6.5
  • OS and its version: win7
  • Browser and its version: 火狐 谷歌

非全屏下正常。

在全屏处理后,Select组件不显示弹出框的下拉选项。

全屏处理如下:

 if(element.requestFullScreen) {
      element.requestFullScreen();
 }else if(element.mozRequestFullScreen) { //兼容moz
      element.mozRequestFullScreen();
 }else if(element.webkitRequestFullScreen) { //兼容webkit
  element.webkitRequestFullScreen();
 }

个人猜测原因:1,全屏后页面置顶,而弹出框置顶层数较低,被覆盖。

@RaoHai
Copy link
Contributor

RaoHai commented Feb 6, 2017

Select 的下拉菜单会默认渲染到 body 上。当你设置了某个元素为全屏的时候,就会被挡住。

你可以在全屏的使用 Select 的 getPopupContainer,指定菜单的渲染父节点到被设置为全屏的元素上。

其他 Popop 之类的都同理。

@afc163
Copy link
Member

afc163 commented Jul 5, 2017

#3487

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

3 participants