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)

PowerPC
macOS
defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: jay, Unassigned)

References

()

Details

(Keywords: testcase)

Attachments

(1 file, 1 obsolete file)

Attached image hand changes to arrow on mouseover (obsolete) —
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.
Still an issue?
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.
(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.
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
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.
Or maybe I need to reread the Selectors section of CSS.
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>.
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.
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
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...
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
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
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>
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>
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;"!).
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.
Okay, reopened until I can borrow a mac again.
Status: RESOLVED → REOPENED
Resolution: WORKSFORME → ---
#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.
Assignee: general → nobody
QA Contact: ian → general
Is there a valid testcase for this anywhere? I can't get to peepo.co.uk any more.
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 ago15 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: