added support for closing modal windows by clicking on the backdrop