2

I wrote a xul application where a SVG fragment is embedded in a XUL element.

(...)
<scrollbox style='overflow:auto;'  flex="1" pack="center">
    <svg:svg version="1.1" baseProfile="full" width="100" height="100" id="drawingArea">
        <svg:rect width="100" height="100" style="fill:red;" title="hello"/>
    </svg:svg>
</scrollbox>
(...)

The image is displayed but the tooltip 'Hello' is not displayed on mouseover.

With the standalone svg file:

<?xml version="1.0"?>
<svg:svg xmlns:svg="http://www.w3.org/2000/svg" version="1.1" baseProfile="full" width="10" height="2000" id="drawingArea">
        <svg:rect width="100" height="100" style="fill:red;" title="xxx"/>
</svg:svg>

the tooltip is displayed in firefox.

Is there a way to show those tooltips in xul ?

Thanks.

Pierre
  • 34,472
  • 31
  • 113
  • 192
  • SVG elements do not have title attributes, they have title children. I've recently fixed this in Firefox so that title attributes do nothing. Most UAs including existing Firefox versions support title children. – Robert Longson Jan 12 '16 at 11:26
  • thank you for the suggestion. I 've added a `Hello` has a child of svg:rect but there is still no tooltip in the xul:window – Pierre Jan 12 '16 at 11:43
  • If you embed a html element in XUL with a title attribute, does that show a tooltip? – Robert Longson Jan 12 '16 at 12:21
  • it doesn't work: I tried inside a hml:div, and inside a html:html/html:body . – Pierre Jan 12 '16 at 12:56
  • I guess tooltips don't work in XUL then (unless you hand roll something). – Robert Longson Jan 12 '16 at 14:11

0 Answers0