The Mysterious Google Chrome SVG Bug Revisited

December 6th, 2010

A previous post outlined the steps I took to track down a bug in Google Chrome that prevented the firing of mouse events on certain SVG elements. After filing a bug report, one commenter suggested that I create a single file that illustrates the bug, rather than a full Google Closure project.

That’s exactly what I did. You can view the test page here. In addition to major simplification, this demo shows that the Chrome SVG event bug also affects event firing from rectangles as well ellipses. Here’s the source:

This demo creates a transformed SVG coordinate space, populates it with three shapes, and assigns two event listeners, enter and exit, to respond to mouse events by changing the shapes’ fill colors.

Update 12/06/2010 Fixed onmouseover/onmouseout attributes in demo code.