Bug 247829 - MouseClick offsetX/offsetY different between Safari 15.5 and Safari 16
Summary: MouseClick offsetX/offsetY different between Safari 15.5 and Safari 16
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: UI Events (show other bugs)
Version: Other
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2022-11-11 15:51 PST by Richard Robinson
Modified: 2022-11-14 23:39 PST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Richard Robinson 2022-11-11 15:51:35 PST
When a foreign object is inside an SVG, any click event that occurs on the object has it's `offsetX` and `offsetY` relative to the SVG container rather than the element.

Believed to be a regression from https://bugs.webkit.org/show_bug.cgi?id=234524 , which overrode `offsetFromContainer` in `RenderSVGBlock`, causing the `RenderSVGForeignObject`
to use this override and return an offset of `(0, 0)` instead of its proper offset.
Comment 1 Richard Robinson 2022-11-11 15:51:42 PST
rdar://100517677
Comment 2 Richard Robinson 2022-11-12 19:37:03 PST
Pull request: https://github.com/WebKit/WebKit/pull/6436
Comment 3 EWS 2022-11-14 16:24:49 PST
Committed 256679@main (d5fba35fb6c5): <https://commits.webkit.org/256679@main>

Reviewed commits have been landed. Closing PR #6436 and removing active labels.
Comment 4 Nikolas Zimmermann 2022-11-14 23:39:48 PST
Thanks! I had a PR open which also fixes offsetFromContainer(), good it is fixed already.