StreamMeDev / hermes

A react message input with autocomplete and other handy features
ISC License
6 stars 0 forks source link

Sticky blank string children #17

Open Jeddf opened 6 years ago

Jeddf commented 6 years ago

When making and then deleting a space after a word, an empty string element is appended on as a child of the contenteditable div.

These elements build up and only seem to be able to be destroyed if the whole div is destroyed, they even stick around after a submit event. This means they can build up indefinitely over time, not seen any performance hit in practice as yet but it seems like something that should be dealt with.

sticky-elements

wesleytodd commented 6 years ago

I think this is actually related to the other one, the formatting function has a bit of funky behavior with multiple spaces. I would look at fixing the handling of that. Might be a good one to add unit tests for since you could probably mimic this all just by calling that method directly.