hover event problem with IE7 and transparent backgrounds

hover event problem with IE7 and transparent backgrounds


Hi, I discovered an IE7 (and perhaps other IE) bug that took me a
while to track down and thought I'd share it with others in case
someone else runs into it.
I had a div with a transparent background that had several inner divs
with that each had background colors specified. Since my page
background was white the transparent background was not in evidence.
The problem was that when I would move the mouse over the div, I would
get mouseleave events firing even though the mouse was still over the
div. This was only a problem on IE7 and worked fine in firefox.
After much debugging I finally realized that my div background was
transparent and by setting it to a color the errant event firing went
away. Whenever the mouse entered an area of the div that was
transparent, the mouseleave event would fire!
It might be good to have a note somewhere for the hover function that
notes there are IE issues when the element has a transparent
background. I'm not sure there is any way to fix this in jQuery since
it appears to be a 'feature' of the IE mouseleave event.
--
Glenn