Closed
Bug 375222
Opened 18 years ago
Closed 15 years ago
pointer changes from hand though area is still active as link anchor
Categories
(Core :: SVG, defect)
Tracking
()
RESOLVED
INVALID
People
(Reporter: jay, Unassigned)
References
()
Details
(Keywords: testcase)
Attachments
(1 file, 1 obsolete file)
655 bytes,
image/svg+xml
|
Details |
effects camino and mozilla
mouseover the black square in the attachment, a sound is heard if plugin is installed. pointer changes from hand to arrow, but square is still active.
compare with mozilla win'xp where hand remains.
![]() |
||
Comment 1•18 years ago
|
||
Still an issue?
Reporter | ||
Comment 2•18 years ago
|
||
well I guess it is...
at the moment this attachment isn't playing a sound for me.
cannot remember how to set the audio up..
it's a real pain that audio didn't receive a similar integration to images.
![]() |
||
Comment 3•18 years ago
|
||
(In reply to comment #2)
> well I guess it is...
So this bug was about the cursor not being correct? When I borrowed the Mac the other day, the mouse cursor was the hand consistantly, so I think this is WFM now, no?
Any issues with audio should be reported in a separate bug.
Reporter | ||
Comment 4•18 years ago
|
||
did you get the audio to play?
if not, your test results are not applicable.
the point being that the graphic is both a link to a uri and plays a sound on mouseover or focus.
iirc my experience was described in #1 whilst correct behaviour should I believe be, audio heard and cursor remains as hand
![]() |
||
Comment 5•18 years ago
|
||
It is impossible for the sound to play. Your CSS essentially says "don't display this thing, but when this thing is hovered, show it". Since it isn't being shown, it is impossible to hover.
![]() |
||
Comment 6•18 years ago
|
||
Or maybe I need to reread the Selectors section of CSS.
![]() |
||
Comment 7•18 years ago
|
||
So the CSS might not be as I thought. According to CSS 2.1:
a:hover d { ... }
matches descendant 'd' when it has an ancestor 'a' that is hovered. I think the problem is that the spec also says "CSS 2.1 doesn't define if the parent of an element that is ':active' or ':hover' is also in that state." Therefore I think that the problem is that the element that is actually hovered is the <rect>, but the :hover pseudo-class is being applied to the parent <g>.
![]() |
||
Comment 8•18 years ago
|
||
CSS 3 Selectors also says "Selectors doesn't define if the parent of an element that is ':active' or ':hover' is also in that state." It looks like you're relying on undefined behavior here.
![]() |
||
Comment 9•18 years ago
|
||
BTW, I'm not saying that Mozilla couldn't behave in the way you want (it would seem useful to me), just that:
a) you're relying on behavior that isn't defined by a specification,
so cross-browser compatibility would be an issue even if we did
b) requests to change CSS selector behavior should be filed as a
separate bug in the Style System component
Reporter | ||
Comment 10•18 years ago
|
||
jwatt,
it seems you (may?) have understood the issue.
I sometimes do, depending...
I have had this working in Opera and Mozilla, but that was then.
it might be helpful if you could create a new attachment that provided the functionality correctly without the need for a bug report.
alternatively it will take me some time to reconsider the issue, add spec links etc.
#9b take your point, however at present iirc this behaviour is limited to svg.
again I have to take time out to consider, if this can be generalised to html etc...
![]() |
||
Comment 11•18 years ago
|
||
By knocking up a pure HTML example I discovered that selectors in Mozilla _do_ happen to work as you expected. The actual your testcase doesn't work is that you haven't specified a width and height on the foreignObject. Both these attributes are required, so Mozilla makes them default to zero if you don't specify them, and according to the specification a value of zero for either width or height disables rendering of the foreignObject (and hence your audio doesn't play).
http://www.w3.org/TR/SVG11/extend.html#ForeignObjectElement
Please note that point (b) in comment 9 still stands. The behavior you're relying on is not specified, so your SVG may not work in all current or future CSS implementations.
Attachment #259533 -
Attachment is obsolete: true
![]() |
||
Comment 12•18 years ago
|
||
So this bug was originally about the cursor not working correctly, and that part is now working for unknown reasons. Therefore closing as worksforme.
Status: NEW → RESOLVED
Closed: 18 years ago
Resolution: --- → WORKSFORME
![]() |
||
Comment 13•18 years ago
|
||
One last tip:
<foreignObject width="1" height="1">
<html xmlns="http://www.w3.org/1999/xhtml">
<body>
<object data="http://www.peepo.co.uk/sound/en/splat.mp3" />
</body>
</html>
</foreignObject>
You do not need the <html> or <body> tags. It just makes your files bigger, causes browsers to use more memory, and in fact may behave weirdly since <html> is only intended to be a top level (root) tag. Instead just do:
<foreignObject width="1" height="1">
<object data="http://www.peepo.co.uk/sound/en/splat.mp3" />
</foreignObject>
![]() |
||
Comment 14•18 years ago
|
||
Err, with the xmlns attribute moved to the <object> of course! So:
<foreignObject width="1" height="1">
<object xmlns="http://www.w3.org/1999/xhtml"
data="http://www.peepo.co.uk/sound/en/splat.mp3" />
</foreignObject>
![]() |
||
Comment 15•18 years ago
|
||
Actually another tip: if you want to make sure the foreignObject doesn't display anything at all on the screen, set style="visibility:visible;" (not style="display:none;"!).
Reporter | ||
Comment 16•18 years ago
|
||
jwatt,
i'd like to reopen...
your new attachment does play sound for me on mouseover...
thanks very much for isolating, reducing and producing.
however on mac the arrow still shows once sound has played.
one can play the sound every time onmouseover again and again and click for new location, but the cursor is wrong.
![]() |
||
Comment 17•18 years ago
|
||
Okay, reopened until I can borrow a mac again.
Status: RESOLVED → REOPENED
Resolution: WORKSFORME → ---
Reporter | ||
Comment 18•18 years ago
|
||
#15
jwatt can't understand why you suggest this.
tried it, then removed CSS rule as redundant, in both cases the sound plays when the file loads, onmouseover and onmouseout
probably I've misunderstood, but please expand.
Updated•16 years ago
|
Assignee: general → nobody
QA Contact: ian → general
Comment 19•15 years ago
|
||
Is there a valid testcase for this anywhere? I can't get to peepo.co.uk any more.
Reporter | ||
Comment 20•15 years ago
|
||
my current understanding is that there is an issue with the standard regarding audio, systemLanguage and offering multiple languages in the client.
Status: REOPENED → RESOLVED
Closed: 18 years ago → 15 years ago
Resolution: --- → INVALID
You need to log in
before you can comment on or make changes to this bug.
Description
•