Chrome SVG DOM title

3,342 views
Skip to first unread message

Vitaly Dyatlov

unread,
May 28, 2010, 3:32:06 AM5/28/10
to Chromium-discuss
Hi.
I am developing a graph application using SVG.

I want to create popups for SVG elements. Using Firefox it's simple:
just set attribute `title`. It working very well in FF, but not
working in Chrome.

Example of `title` attribute for FF:
<circle cx="487" cy="93" r="3" fill="blue" title="4 actions -
05.05.2010" stroke-width="0"/>

Btw, about strokes and stroke widths: code above creates circle
without border (stroke-width=0). But, if I'll add stroke="red", then
border will appear in Chrome (in FF all ok).
<circle cx="487" cy="93" r="3" fill="blue" title="4 actions -
05.05.2010" stroke="red" stroke-width="0"/>

I dont know it's a bug or not..

Any suggestions?

P.S.: english is not my native language, sorry

Ben

unread,
May 28, 2010, 11:56:26 AM5/28/10
to chromium...@chromium.org
Did you try adding style="stroke:none" to the circle? That should
prevent the stroke from appearing, I think.

Vitaly Dyatlov

unread,
May 28, 2010, 12:05:36 PM5/28/10
to Chromium-discuss
No tried, but I think it will help. Anyway.. if I set width of stroke
to 0, it must be 0, not 1. Are you agree? :)

Ben

unread,
May 28, 2010, 12:11:37 PM5/28/10
to chromium...@chromium.org
I agree. Just thought I'd ask in case you had not tried that yet.

Sounds like a bug to me, but I'm not sure if it would be in Chrome or
Webkit. Should probably search crbug.com for a bug, and file one if you
don't find one that matches your problem.

Would be nice to hear from someone else on this first, though, since I'm
not really an expert on SVG.

Vitaly Dyatlov

unread,
May 28, 2010, 12:29:25 PM5/28/10
to Chromium-discuss
Found issue: http://code.google.com/p/chromium/issues/detail?id=15461
Thanks, Ben.

About `title` attribute. its non-standard attribute, but very usefull,
thanks to FF :)
I found that by standard we can create inner tag `title` inside
element, then it should work as expected:
<circle cx="487" cy="93" r="3" fill="blue" stroke-width="0">
<title>title goes here</title>
</circle>

But I not found any browser, which support it ))) Although FF support
`title` attribute..

Jeff Schiller

unread,
Jun 15, 2010, 4:35:22 PM6/15/10
to md.x...@gmail.com, Chromium-discuss
FYI, The correct way for hover tooltips in SVG is to use the <title> child elements like so:

<circle cx="487" cy="93" r="3" fill="blue" title="4 actions -
05.05.2010" stroke-width="0">
  <title>My tooltip here</title>
</circle>

I recently (a month ago) submitted an extensive patch to WebKit for this so that it works now consistently in Safari, Chrome, Firefox and Opera: https://bugs.webkit.org/show_bug.cgi?id=16854

Regards,
Jeff


--
Chromium Discussion mailing list: chromium...@chromium.org
View archives, change email options, or unsubscribe:
   http://groups.google.com/a/chromium.org/group/chromium-discuss

Reply all
Reply to author
Forward
0 new messages