Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can I detect the source of a focus? (Javascript, jQuery)

Quick question - is it possible to detect whether a focus has come from a mouse click or a tab from a focus event?

I guess if there isn't, I'll have to use a click handle on the same element to determine the source, but I'd prefer a way from the focus event.

Thanks

Gausie

like image 474
Gausie Avatar asked Dec 11 '09 14:12

Gausie


1 Answers

May not work 100% but if there isn't a direct way then can't you just use Mouseover and detect it? The person will have bring the mouse over the control to select it (?)

like image 167
Shoban Avatar answered Oct 05 '22 11:10

Shoban