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

SubMenu disappears #8453

Closed
exced opened this Issue Dec 5, 2017 · 7 comments

Comments

Projects
None yet
5 participants
@exced

exced commented Dec 5, 2017

Version

3.0.0

(works fine on 2.13.10)

Environment

Safari 11.0.1
Chrome 62.0.3202.x (works fine)

Reproduction link

https://ant.design/components/menu/

Steps to reproduce

set a SubMenu and try to hover it, menu disappears when mouse leaves parent item

What is expected?

Children are not supposed to vanish

What is actually happening?

Children vanish
antd

@benjycui

This comment has been minimized.

Contributor

benjycui commented Dec 6, 2017

It seems that it works fine.

@exced

This comment has been minimized.

exced commented Dec 6, 2017

Sorry I have not tested on different web browsers, I edited my issue above.

Thanks @benjycui

@benjycui benjycui added the Bug🐛 label Dec 6, 2017

@benjycui

This comment has been minimized.

Contributor

benjycui commented Dec 6, 2017

It works fine in http://react-component.github.io/menu/examples/antd.html , so it maybe a bug from style.

@jljsj33

This comment has been minimized.

Member

jljsj33 commented Dec 7, 2017

还有展开的动画没掉了,, @benjycui

@afc163 afc163 referenced this issue Dec 7, 2017

Closed

Menu兼容问题 #353

@lvsenlin

This comment has been minimized.

lvsenlin commented Dec 7, 2017

这个问题确实存在,文档中代码演示就可直接复现:https://ant.design/components/menu-cn/

@afc163

This comment has been minimized.

Member

afc163 commented Dec 7, 2017

经过艰苦卓绝的排查,发现 safari 下会有元素位置未能按照 style 对象的值及时渲染的问题。

2017-12-07 21 25 23

上图中 style 已经更新了,但是 getBoundingClientRect 拿到的元素位置却还是老位置。其他浏览器没有这个问题。

yiminghe/dom-align#26 里强制 relayout 后再获取位置,本地测试可修复。

benjycui added a commit to yiminghe/dom-align that referenced this issue Dec 8, 2017

@afc163

This comment has been minimized.

Member

afc163 commented Dec 8, 2017

It is fixed in dom-align@1.6.6, try to reinstall node_modules.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment