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

Pasting text does not update form control value or content #211

Closed
behdi opened this issue Aug 1, 2024 · 0 comments · Fixed by #212
Closed

Pasting text does not update form control value or content #211

behdi opened this issue Aug 1, 2024 · 0 comments · Fixed by #212
Labels

Comments

@behdi
Copy link
Contributor

behdi commented Aug 1, 2024

Pasting content without any modification, does not update update the form control value, not does it emit anything from contentChange.

Please take a look at the attached stackblitz: https://stackblitz.com/edit/stackblitz-starters-nbrfbe?file=src%2Fmain.ts

To reproduce, simply copy something and paste it in the text box. As you can see, the form control value will not be updated.

I took a look at the code, and it seems to be a side effect of PR #200. We are calling event.preventDefault() in the onPaste method, and we never notify angular that the content of the text box has changed.

This has been present since version v17.1.2, so it would be great if we could somehow backport the fix to v17 of the library as well. It's causing issues for us on the our codebase :(

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

Successfully merging a pull request may close this issue.

2 participants