Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#10047 closed feature (plugin)

New "blur" event for dialogs?

Reported by: matiax Owned by:
Priority: minor Milestone: none
Component: ui.dialog Version: 1.10.4
Keywords: Cc:
Blocked by: Blocking:


I think it woud be nice to be able to tell when a dialog loses focus.

I needed to change all dialog's title bar's color except the one which gains focus (this one will use default css style) and I couldn't find a "blur" event.

I've found this example which does what I needed,, but I think it's more intuitive to manage a change of color for the non-focused dialogs on a blur event rather than focus, besides good coding practice.

Change History (2)

comment:1 Changed 9 years ago by tj.vantoll

Resolution: plugin
Status: newclosed

Hi matlax,

Thanks for taking the time to contribute to jQuery UI. This is a bit tricky to implement and adds some complexity to the code for functionality that no one has asked for before. In my opinion this is best done with an extension. Here's one that fires blur events:

If others want this functionality in the widget, they can comment on this ticket, and we can consider adding the event.

comment:2 Changed 9 years ago by matiax

That's a great extension, I will use it in my project. Thanks! And I hope this gets in the widget core some day

Note: See TracTickets for help on using tickets.