Clean-up event trap more thoroughly after input

Repeated text entry events can result in lots of empty text nodes