`.offset()` takes CSS zoom into account
Author: mgolCreated Sep 26, 2024Updated May 4, 2026
LabelsOffset
Description
Numerous jQuery UI widgets are not working correctly with CSS zoom, as reported in https://github.com/jquery/jquery-ui/issues/2292. The root cause is jQuery UI reliance on .offset() which returns final coordinates of the element, taking into account CSS transforms & CSS zoom - the jQuery UI issue is specifically about the latter.
I thought we should discuss the Core behavior.
Link to test case
- with CSS zoom: https://output.jsbin.com/zoyiwey/1
- with CSS transform / scale: https://output.jsbin.com/vuzupuk/1
Source: jquery/jquery