Is there a way to get onChange event to fire as I type?

Adam Diestelkamp shared this question 21 months ago
Answered

When I use onChange with a text input it appears it only fires when I blur the field. Is that what it's supposed to do? Or is there a way to fire that event as I type each character?


I'm using it to change the view based on what an email address contains, I want to be able to have the event occur before blur.

Comments (2)

photo
2

Hi Adam,


You should use an 'on key up' event instead of 'on change'.


Best,

Danielle

photo
1

Thanks! That should do the trick!

photo