SVG mouseOut event not always firing on dynamic svg:use element
Categories
(Core :: SVG, defect)
Tracking
()
People
(Reporter: alexhaan, Unassigned)
References
(Depends on 1 open bug, Blocks 1 open bug, )
Details
(Keywords: testcase)
Attachments
(1 file)
|
3.47 KB,
application/xhtml+xml
|
Details |
Comment 2•15 years ago
|
||
Comment 4•15 years ago
|
||
Updated•9 years ago
|
Comment 6•9 years ago
|
||
Updated•9 years ago
|
Updated•9 years ago
|
Updated•3 years ago
|
Sorry I didn't notice the duplication, but the titles are quite different, and this didn't show up in my search - different but related events.
This bug is 14 years old. What are it's chances of getting fixed in the foreseeable future?
Is there a workaround? I suppose I could check for the proper conditions, then focus the element and call the click event handler. Any other suggestions?
Comment 10•1 year ago
|
||
It's pretty hard to fix, or we would likely have fixed it by now. I was trying to rewrite use elements in bug 738574 but I just can't quite get that to work. Even then I don't know whether that would have fixed this issue.
Alternatively, this is all open source so if you want to work on it yourself, have at it, just like me. I don't think this is likely to be the ideal first bug to tackle though.
We could be smarter about updates i.e. compare the before and after shadow DOMs as we do with display lists (maybe reuse some display list logic). And then not reclone everything when the href changes.
Workaround - stop using use elements. They are almost always misused - you're almost always better off just creating copies yourself rather than having use element do your cloning for you.
Comment 11•1 year ago
|
||
Yea, I don't think this would be a good first bug-fix attempt for me in this arena. Stop using <use> elements is a novel idea for me in this context. My next attempt at a workaround will be to set pointer-events="none" for the svg element and to add an invisible <rect> covering the full viewBox that handles all the events. That way it shouldn't matter what the <use> element does, as it will never be an event target.
If that fails then I'll abandon <use> and start cloning, adding, and removing elements on the fly. But it strikes me that I might end up with the same problem in this case. Swapping the element for another element could cause the same loss of focus if that element is the event target or currentTarget. I'll post my findings here, unless you'd prefer that I don't.
Comment 12•1 year ago
|
||
Maybe post your findings in your bug, that way you won't disturb people who only care about this one.
Description
•