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

Dropdown当trigger="click"时,点击后菜单展示又立即隐藏 #788

Closed
Javey opened this issue Feb 10, 2023 · 0 comments
Closed

Dropdown当trigger="click"时,点击后菜单展示又立即隐藏 #788

Javey opened this issue Feb 10, 2023 · 0 comments

Comments

@Javey
Copy link
Member

Javey commented Feb 10, 2023

CodeSandbox

Description
原因为:click时,菜单展示,这时会绑定document.click事件用来当用户之后点击空白处时隐藏菜单,但这个事件在首次绑定时就会立即执行。因为浏览器在处理事件回调时,会顺序处理MicroTask然后才冒泡
vuejs/vue#6566

@Javey Javey closed this as completed in 5a44c03 Feb 14, 2023
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