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

nzCopyable button causes form submission #6605

Closed
goldsam opened this issue Apr 14, 2021 · 0 comments
Closed

nzCopyable button causes form submission #6605

goldsam opened this issue Apr 14, 2021 · 0 comments
Assignees

Comments

@goldsam
Copy link
Contributor

goldsam commented Apr 14, 2021

Reproduction link

https://stackblitz.com/edit/ng-zorro-antd-ivy-dyfeqh?file=src%2Fapp%2Fapp.component.ts

Steps to reproduce

Create a <form>element with an nz-form attribute which contains a child <span> element with nzCopyable and nzContent attributes. Add an (ngSubmit) callback to the form. In the running app, click the icon to copy the nzCopyable text.

What is expected?

The text should be copied without submitting the form

What is actually happening?

The text is copied and the form is also submitted.

Environment Info
ng-zorro-antd 11.4.0
Browser Google Chrome 89.0.4389.114 (Official Build) (64-bit)
goldsam pushed a commit to goldsam/ng-zorro-antd that referenced this issue Apr 14, 2021
… in nz-text-copy component

add button attribute to prevent form submission on some browsers when copying to clipboard

closes NG-ZORRO#6605
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