users.sch.gr - The coordinates are different when clicking on the same location on a svg text #135876
Labels
browser-firefox
engine-gecko
The browser uses the Gecko rendering engine
priority-normal
severity-important
A non-core broken piece of functionality, not behaving the way you would expect.
status-needsinfo-wisniewskit
ping @wisniewskit
Milestone
URL: https://users.sch.gr/kodulis/svg_tspan_test.html
Browser / Version: Firefox 124.0
Operating System: Windows 10
Tested Another Browser: Yes Chrome
Problem type: Something else
Description: When mouse is clicking or moving over an "svg tspan" element, the offset coordinates differ from the corresponding if it was just an "svg text" element. This inconsistency does not exist on Chrome, Opera and Edge.
Steps to Reproduce:
I am using Firefox browser version 124.0.2 (64-bit) on a desktop computer.
When mouse is clicking or moving over an "svg tspan" element, the "event.offsetX" and "event.offsetY" coordinates differ from the corresponding if it was just an "svg text" element.
In contrary, the "e.clientX" and "e.clientY" coordinates are the same.
This is not happening on Chrome, Opera and Edge. All these browsers report the same coordinates regardless "tspan" or "text".
I can't say which behavior is correct and which is wrong. But there is an inconsistency.
I made a test page to see the problem.
If you click, for example, on T of the text the offsetX coordinate differs from that if you click on T of the tspan. This is not happening on other browsers.
View the screenshot
Browser Configuration
From webcompat.com with ❤️
The text was updated successfully, but these errors were encountered: