Adding Focus/BlurListeners to a CssLayout

Hi, i have a CssLayout which contains a TextArea(content), in the focuslistener function of content, CssLayouts extends and a new TextArea(title) is added to top of CssLayout. What i am trying to do is, when clicking outside of the CssLayout
it minimize the old version(which contains only content, not title). I used blurlistener for textareas but when i click the other textarea, since one of them lost focus it immediately changed the old version of CssLayout. I think it would be better ifthere is a way to listen if outsideof the layout is clicked? Thanks in advance.