Closed Bug 958273 Opened 10 years ago Closed 10 years ago

JavaScript in SVG file included in HTML as object returns incorrect client coords

Categories

(Core :: SVG, defect)

27 Branch
x86_64
Windows 7
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 874811

People

(Reporter: j.tosovsky, Unassigned)

References

()

Details

1. Navigate http://drifted.in/other/wheel.html
2. Drag that green wheel and rotate it

You can observe unexpected rotation. It should rotate around the center. Works fine in Chrome or MSIE. Finally found it is caused by zero client coords in nested SVG DOM document. 

When SVG document is placed into HMTL as an object, these coords are 'inherited' incorrectly and cannot be processed directly using a SVG script. 

The only way I found to access correct values is via traversing the parent document, e.g. parent.document.getElementById("wheel").clientHeight, but in this case you have to know the ID defined in the parent document :-(
Status: UNCONFIRMED → RESOLVED
Closed: 10 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.