Fix parentNode check
Emit change and destroy events from the input