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

NzDropdownService doesn't support create with click event #3175

Closed
wheeljs opened this issue Mar 27, 2019 · 1 comment
Closed

NzDropdownService doesn't support create with click event #3175

wheeljs opened this issue Mar 27, 2019 · 1 comment
Assignees

Comments

@wheeljs
Copy link
Contributor

wheeljs commented Mar 27, 2019

Reproduction link

https://stackblitz.com/edit/angular-snzcmj-q1nxjh

Steps to reproduce

Remove $event.stopPropagation() in contextMenu method at line 41, it seems nothing happened when clicking. But after putting breakpoint in NzDropdownService#create and step into, we can see the dropdown be created and close immediately.

What is expected?

Create and show dropdown correctly, like ng-zorro-antd@7.0.0-rc.3.

stackblitz with ng-zorro-antd@7.0.0-rc.3: https://stackblitz.com/edit/angular-snzcmj-hzlura

What is actually happening?

Dropdown was created and closed immediately.

Environment Info
ng-zorro-antd 7.1.0
Browser 版本 73.0.3683.86(正式版本) (64 位)

Sorry for my English.

@vthinkxie
Copy link
Member

NzDropdownService is designed for contextmenu event, all click event outside the menu will close it immediately.
it works as design, you can add $event.stopPropagation() just like what you have done in the repro link.

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

2 participants