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

[Bug Report] van-dropdown-menu 和 popup混用问题 #3806

Closed
mengfairy opened this issue Jul 10, 2019 · 3 comments
Closed

[Bug Report] van-dropdown-menu 和 popup混用问题 #3806

mengfairy opened this issue Jul 10, 2019 · 3 comments
Milestone

Comments

@mengfairy
Copy link

设备 / 浏览器

iphone 6s / safari & 微信内置浏览器

Vant 版本

2.0.6

Vue版本

2.6.10

重现链接

https://codesandbox.io/s/vant-issue-moban-0s1qi

描述问题

van-dropdown-menu 和 popup混用使用,并设置 popup 挂载到body下,点击picker 取消 或 确认 关闭弹框时,van-dropdown-menu也会被关闭。pc和手机 都能复现

不设置 popup 挂载到body下,不会有这个问题,但是在手机端上,popup 内 picker 显示不完整,这个只有手机能复现

@chenjiahan
Copy link
Member

Popup 被挂载到 body 下面后,会被视为菜单的外部元素,目前 DropdownMenu 在点击外部元素时,默认会关闭菜单,

下个版本会加个close-on-click-outside属性来控制此行为

@chenjiahan
Copy link
Member

已在 2.0.7 版本添加

@NEWDSA
Copy link

NEWDSA commented Jan 7, 2022

DropdownMenu中增加,close-on-click-outside 也无效。

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

No branches or pull requests

3 participants