Skip to main content

Search and Top Navigation

#10047 closed feature (plugin)

Opened May 17, 2014 03:40AM UTC

Closed May 19, 2014 01:13PM UTC

Last modified May 26, 2014 03:23PM UTC

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:
Description

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, http://jsfiddle.net/JqQA6/, 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.

Attachments (0)
Change History (2)

Changed May 19, 2014 01:13PM UTC by tj.vantoll comment:1

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: http://jsfiddle.net/tj_vantoll/9M3Kc/.

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

Changed May 26, 2014 03:23PM UTC by matiax comment:2

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