PDA

View Full Version : Ext.Window close for out side mouse click



nuwansh
20 Jul 2010, 9:19 AM
I rendered Ext.Window by clicking button. And I want to close the rendered window when mouse click on out side the window. Is it possible to close window?

Animal
20 Jul 2010, 9:44 AM
Add a document mousedown listener on show. In the handler check whether the event is within the Window's el.

If not hide, the Window.

Remove the listener on hide.

Simples.