stevermeister / ngx-wig

Angular(also Angular 17) WYSIWYG HTML Rich Text Editor (from ngWig - https://github.com/stevermeister/ngWig)
Apache License 2.0
229 stars 51 forks source link

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

Closed behdi closed 3 months ago

behdi commented 4 months ago

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.

sonarcloud[bot] commented 4 months ago

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarCloud

stevermeister commented 3 months ago

@behdi great finding!

sorry for the delay in merge

behdi commented 3 months ago

@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 commented 3 months ago

@behdi good point!

stevermeister commented 3 months ago

published ngx-wig@17.1.8