Problem with Firefox, javascript, and Canvas

Posted by Rob on Stack Overflow See other posts from Stack Overflow or by Rob
Published on 2010-04-08T03:26:35Z Indexed on 2010/04/08 3:33 UTC
Read the original article Hit count: 121

I'm having a Firefox-specific issue with a script I wrote to create 3d layouts.

The correct behavior is that the script pulls the background-color from an element and then uses that color to draw on the canvas. When a user mouses over a link and the background-color changes to the :hover rule, the color being drawn changes on the canvas changes as well. When the user mouses out, the color should revert back to non-hover color.

This works as expected in Webkit browsers and Opera, but Firefox chokes on it if mouseout is triggered and no mouseover event follows it. This is easier to see than for me to describe, and it's too much code to post here, so here is a link:

http://www.robnixondesigns.com/strangematter/

© Stack Overflow or respective owner

Related posts about javascript-events

Related posts about canvas