I'm not sure how knowing the rectangle of each elements help you here...
Also won't it be better to just get the inner-most element that was clicked?
Also won't it be better to just get the inner-most element that was clicked?