I'm trying to detect a click outside a modal window to close it. Following other posts, I created a transparent layer just below the modal window and listened for click events on it. However, the bottom layer receives events even on clicking the window. How can I make the top layer of a stack stop events from reaching layers below it?
modalWindow and outsideClicks are the two layers I'm talking about. Both are children of the clientPage layer.