Bug 8827 - SVG: addEventListener <use> mouseover broken
Summary: SVG: addEventListener <use> mouseover broken
Status: CLOSED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: SVG (show other bugs)
Version: 420+
Hardware: Mac OS X 10.4
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-05-10 04:15 PDT by jay
Modified: 2007-01-31 05:36 PST (History)
2 users (show)

See Also:


Attachments
broken-onmouseover test (1.34 KB, image/svg+xml)
2006-05-10 04:18 PDT, jay
no flags Details
demo without <use> (1.20 KB, image/svg+xml)
2006-05-10 04:19 PDT, jay
no flags Details
<a><g><use/></g></a> (1.37 KB, image/svg+xml)
2006-05-10 04:26 PDT, jay
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description jay 2006-05-10 04:15:54 PDT
when <use> and <symbol> are in an SVG addEventListener is triggered by the cursor crossing the margin of the window, rather than the border of the element.
Comment 1 jay 2006-05-10 04:18:02 PDT
Created attachment 8207 [details]
broken-onmouseover test

mouseover the window raises alert.
I've tried changing, and switching around the two ids but not been able to resolve why either is used in error.
Comment 2 jay 2006-05-10 04:19:22 PDT
Created attachment 8208 [details]
demo without <use>

This example doesn't have <use> and works as designed
Comment 3 jay 2006-05-10 04:26:36 PDT
Created attachment 8210 [details]
<a><g><use/></g></a>

don't let anchors only surround <use>, make sure they surround a group that surrounds <use>
Comment 4 jay 2006-05-10 04:31:03 PDT
Is this a requirement of the specs?

By surrounding <use> with <g> and all this with anchors this bug disappears.

  <a xlink:href="http://www.google.com">
    <g id='symbol3'>
       <title>games</title>
       <use xlink:href="#sound" x="30%" y="15%"  width="10%" height="10%"  />
     </g>
   </a>

NOT

  <g id='symbol3'>
  <title>games</title>
    <a xlink:href="http://www.google.com">
       <use xlink:href="#sound" x="30%" y="15%"  width="10%" height="10%"  />
     </a>
   </g>
Comment 5 Eric Seidel (no email) 2006-09-20 16:44:00 PDT
No, this is just a bug in our <use> and <symbol> implementations.
Comment 6 Eric Seidel (no email) 2007-01-31 04:53:14 PST
niko might have already fixed this.
Comment 7 Eric Seidel (no email) 2007-01-31 04:54:49 PST
It looks like it works to me.   Jay, can you please confirm and close?