Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

It's not really a bug for the same reasons that jQuery implements focus/blur independently from focusin/focusout. focus events just don't bubble out natively so you have to make your synthetic event system do that if you want / need it. jQuery implements it as a separate pair of events, React chose not to / only deviates from DOM behavior in very few instances (onchange). Using jQuery was just easier for my use case which seemed too exotic to claim any kind of general relevance.


See a working example: http://jsfiddle.net/spicyj/3tn45/


Might be a good idea to document stuff like that ;)


Yes, React's synthetic event system is supposed to bubble for focus.




Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: