| Summary: | getBoundingClientRect() reports wrong sizes for foreignObject elements on page zoom | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Oleksandr <olexander.danilchenko> | ||||||
| Component: | SVG | Assignee: | Nobody <webkit-unassigned> | ||||||
| Status: | NEW --- | ||||||||
| Severity: | Major | CC: | david.perkowski, karlcow, olexander.danilchenko, sabouhallawa, simon.fraser, webkit-bug-importer, zalan, zimmermann | ||||||
| Priority: | P2 | Keywords: | BrowserCompat, InRadar | ||||||
| Version: | Safari 16 | ||||||||
| Hardware: | Mac (Apple Silicon) | ||||||||
| OS: | macOS 13 | ||||||||
| URL: | https://stackblitz.com/edit/stackblitz-starters-jh33b2?file=src%2FApp.tsx&file=src%2Fstyle.css | ||||||||
| See Also: | https://bugs.webkit.org/show_bug.cgi?id=71819 | ||||||||
| Attachments: |
|
||||||||
|
Description
Oleksandr
2023-09-04 03:40:18 PDT
Created attachment 467538 [details]
Chrome properly places the tooltip underneath the embedded XHTML element
I wanted to add that we discovered this problem during the course of work to introduce accessibility improvements to a data chart that we render as an SVG. Having consistent behavior for zoom will make it easier to treat accessibility as a primary aspect of implementation on the web, and will encourage developers to engage with such challenges, rather than backing away when they encounter browser differences/bugs like this. On a second look, I can say that [bug 71819](https://bugs.webkit.org/show_bug.cgi?id=71819) might indeed describe the same buggy behavior of the getBoundingClientRect() for the elements within the <foreignObject/>. Especially looking at the examples attached to that bug. Both I and Gavin Kistner experienced that the getBoundingClientRect() values are transformed against the viewport on zoom and don't correspond to the parent <foreignObject/> dimensions or position |