javascriptinternet-explorereventsfall-through

Internet explorer 8 event fall through transparent parents


When you have a transparent div and you generate a click on in (for example) the click falls right through to elemets below. This behavior does not exists in other modern browsers and I am sure is out of any W3C recommendation. Finally, it messes up my design. Is there any way to work around this?

Clarification - transparent like with no background color defined or with background-color: transparent;

Another clarification - what I mean by falls right through is that the browser behaves as the transparent element is completely not there - ignores its event handlers and triggers other event handlers of elements below that are not his parents and should be hidden by it.

I solved it by setting the background color to non trasnparent and using

-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=40)";

to achieve transparency instead of the old

-ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr=#66C6DEA2,endColorstr=#66C6DEA2)";

Thanks to everyone that helped!


Solution

  • Can it we fixed by giving the element a background color and a zero or nearly zero opacity ? This hack is used when you want to give the file input elements a custom appearance (http://www.quirksmode.org/dom/inputfile.html)