You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If the event’s dispatch flag is set, return the x[y]-coordinate of the position where the event occurred relative to the origin of the padding edge of the target node, ignoring the transforms that apply to the element and its ancestors, and terminate these steps.
Return the value of the event’s pageX[Y] attribute.
Which doesn't give any guidance for what to do when the event target is an SVG layout element, and doesn't have its own padding edge. Firefox seems to use the bounding box of the SVG element (and the local user-space coordinate system). Other browsers seem to use the padding-box of the nearest ancestor <svg> with CSS box layout, and the outside coordinate system for that element (i.e., not including any viewBox scaling). (Firefox does the same when the event target is an <svg> element that has CSS layout boxes.)
For what it's worth: the Firefox behavior is much more useful when working with SVG. But it seems that the cowpath is more heavily-trodden in the other direction.
More generally: reading that definition, I have no idea how "ignoring the transforms" is supposed to be interpreted. Use the local coordinate system or use the document coordinate system?
The text was updated successfully, but these errors were encountered:
The definition of
MouseEvent.offsetX
/Y
is:Which doesn't give any guidance for what to do when the event target is an SVG layout element, and doesn't have its own padding edge. Firefox seems to use the bounding box of the SVG element (and the local user-space coordinate system). Other browsers seem to use the padding-box of the nearest ancestor
<svg>
with CSS box layout, and the outside coordinate system for that element (i.e., not including anyviewBox
scaling). (Firefox does the same when the event target is an<svg>
element that has CSS layout boxes.)For what it's worth: the Firefox behavior is much more useful when working with SVG. But it seems that the cowpath is more heavily-trodden in the other direction.
More generally: reading that definition, I have no idea how "ignoring the transforms" is supposed to be interpreted. Use the local coordinate system or use the document coordinate system?
The text was updated successfully, but these errors were encountered: