-
Notifications
You must be signed in to change notification settings - Fork 7
Changed: clean inserted by browser. #50
Conversation
Changing all |
// take `newText` and compare it to (cleaned up) view. | ||
// It could also be done in mutation observer too, however if any outside plugin would like to | ||
// introduce additional events for mutations, they would get already cleaned up version (this may be good or not). | ||
mutation.newText = mutation.newText.replace( /\u00A0/g, ' ' ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You shouldn't modify a property of an object because there can be other listeners interested in this value.
BTW, you can also create a manual test, similar to the existing typing manual tests, where editor model will be logged every few seconds and |
I forgot to mention that there is a related PR ckeditor/ckeditor5-engine#620 |
…ed/inserted correctly.
I added a test as suggested by @Reinmar |
While testing this I found just one bug – https://github.com/ckeditor/ckeditor5-typing/issues/52, but it turned out that it's unrelated to this changes. Most likely, it's a FF bug. Awesome work, @scofalik! |
Fixes ckeditor/ckeditor5#3059.