Closed
Bug 563500
Opened 15 years ago
Closed 15 years ago
zero opacity svg shape does not receive mouse events
Categories
(Core :: SVG, defect)
Tracking
()
RESOLVED
WORKSFORME
People
(Reporter: mgobeil, Unassigned)
Details
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3 (.NET CLR 3.5.30729)
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3 (.NET CLR 3.5.30729)
If you create a shape with stroke-opacity = 0, it won't receive mouse events as of firefox 3.6 (works in 3.5). If it's set to even 0.001, it will start to receive events. Looks like an optimization like "if(opacity == 0) { [ignore shape entirely] }
Zero opacity shapes are very useful as transparent "hit zones" to capture mouse events. For example, a wide transparent hit zone can be placed on top of a narrow visible line, making it easier for the user to acquire with their mouse.
Reproducible: Always
Steps to Reproduce:
1. make shape with zero opacity
2. attach listener to mouseover
3. move mouse over shape
Actual Results:
mouseover event not fired
Expected Results:
mouseover event fired
![]() |
||
Comment 1•15 years ago
|
||
The described behavior sounds like the correct one, now that we implement pointer-events correctly per SVG spec. See http://www.w3.org/TR/SVG11/interact.html#PointerEventsProperty and specifically:
Initial: visiblePainted
It sounds like you're looking for "pointer-events: all" for your use case.
Comment 2•15 years ago
|
||
(In reply to comment #0)
Please attach a complete testcase to the bug.
The fix Boris suggested works, and since it is now more compliant with SVG, would you still like a test case to cover the change in functionality from 3.5 to 3.6? or just close this bug as resolved/works as designed?
Comment 4•15 years ago
|
||
works as designed then.
Status: UNCONFIRMED → RESOLVED
Closed: 15 years ago
Resolution: --- → WORKSFORME
You need to log in
before you can comment on or make changes to this bug.
Description
•