David MZ David MZ - 1 month ago 5
Javascript Question

How do I correctly get the event target in IE when document.click event is registered in javascript?

I have registered the click event on document object, I want to be able to branch logic depending on the target that was clicked, the targets are divs on the page

IE 7-9 has a strange bug that absolutely positioned divs when clicked, do not register as the target of the event, this happens only in IE, the target that is returned is the underlying divs below the absolutely positioned one.

Is there a fix/hack to handle it, surly IE is always making trouble.

Thank you

Answer

The issue was caused by another event binding on document, it is a specific issue that makes this question irrelevant.

Comments