Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

HTML onUnclick handler? [duplicate]

I want to trigger one handler when an input field is clicked, and another handler when it is deselected (i.e. if someone clicks outside of the field). Is there a way to accomplish this?

The click handler is simple enough:

<input onClick={props.clicked}>

Is it possible to create an "unclick" handler?

like image 667
James Shapiro Avatar asked Oct 19 '25 04:10

James Shapiro


1 Answers

I think onBlur event should be suitable for this

like image 98
Ran Marciano Avatar answered Oct 21 '25 18:10

Ran Marciano



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!