Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Blur function is calling when window is minimize

Tags:

jquery

blur

I have text box in page on which I have written blur function in jQuery.
I don't want it to be called when the user minimizes the window and that time focus is in that box.

like image 211
subash Avatar asked Mar 05 '26 14:03

subash


1 Answers

The only way I can think to do this is probably more work than simply making it so that it does the right thing regardless of how the focus is lost. Essentially you'd have to rewrite it so that it did the action, not when focus is lost, but when another element on the page gains focus after the original element had focus. Since the minimize button isn't part of the page, it wouldn't trigger the event until it was expanded and another element gained focus. I can think of many things that would go wrong and the code would likely be very complicated just to handle this one requirement.

like image 160
tvanfosson Avatar answered Mar 07 '26 03:03

tvanfosson