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

Fix: Form Control and content not reflecting any changes when pasting text #212

Merged

Conversation

behdi
Copy link
Contributor

@behdi behdi commented Aug 1, 2024

I have fixed an issue where pasting text inside the editor's text box would not update the form control value or cause contentChange to emit a value.

The issue seems to stem from the fact that anytime a paste event happens, we call event.preventDefault, and then we modify the html nodes, which causes zone.js to not pick up any of the added changes, until we actually manually add more content by typing into the text box.

Take a look at the issue for more info #211.

@bampakoa bampakoa linked an issue Aug 2, 2024 that may be closed by this pull request
Co-authored-by: Aristeidis Bampakos <[email protected]>
Copy link

sonarcloud bot commented Aug 2, 2024

@behdi behdi requested a review from bampakoa August 2, 2024 09:35
Copy link
Collaborator

@bampakoa bampakoa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch 👍

@stevermeister
Copy link
Owner

@behdi
great finding!

sorry for the delay in merge

@stevermeister stevermeister merged commit 01988ba into stevermeister:master Aug 13, 2024
2 checks passed
@behdi
Copy link
Contributor Author

behdi commented Aug 13, 2024

@stevermeister It may be a bit of a tall ask, but is it possible to backport this fix to v17 as well? Since this issue was introduced there as well.

@stevermeister
Copy link
Owner

@behdi good point!

@stevermeister
Copy link
Owner

published [email protected]

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

Successfully merging this pull request may close these issues.

Pasting text does not update form control value or content
3 participants