Repair layer closing by underlay click

Is it only used to bind events to, or for placing content too? Just to make sure we don't break something else.