Bug 27161 (zoom-js-positioning)

Summary: JS positioned elements get misplaced on zooming
Product: WebKit Reporter: Patrick <patcito>
Component: Layout and RenderingAssignee: Nobody <webkit-unassigned>
Severity: Normal CC: ahmad.saleem792, dav.glass, patcito
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: OS X 10.5   
URL: http://jqueryui.com/demos/datepicker/

Description Patrick 2009-07-10 16:02:22 PDT
Some dropdown menus that use JS for positioning get wrongly positioned on zooming in or out, it only shows the menu at the right position when no zooming is done. Otherwise it might appear down the page instead of where it should be. I found an example online, not exactly a menu but it's the same problem:


Put the focus the "Date" text input, the datepicker should appear. Zoom in and it gets out of place.

I can reproduce this with Webkit Nightly, Chrome and QtWebkit on all platforms.
Comment 1 Dav Glass 2009-07-29 10:18:12 PDT
This seems to be an issue in getBoundingClientRect. It's returning page level non-zoomed box information even when zoomed.

Here is a small repro case:

Comment 2 Dav Glass 2009-07-29 11:14:26 PDT
Just tested against: Version 4.0.2 (5530.19, r46507)

And it is fixed in that version..
Comment 3 Patrick 2009-07-29 12:33:07 PDT
Hey Dav,

Did you test this too? http://jqueryui.com/demos/datepicker/
Comment 4 Dav Glass 2009-07-29 12:46:56 PDT
Patrick --

It looks to work for me with that nightly:


That is the color picker zoomed x 2
Comment 5 Patrick 2009-07-29 12:49:32 PDT
Thanks for testing Dav!
Comment 6 Ahmad Saleem 2022-09-21 15:26:07 PDT
I took the test case from Comment 01 via Wayback Archive:

Link - https://web.archive.org/web/20100521062155/http://blog.davglass.com/files/bugs/safari/bug-27161.html

I am not able to reproduce this in Safari 16 and the numbers with and without zoom and marginal (due to pixel difference in clicking within red dot).

Further, Comment 02 confirms that it was fixed and also again in Comment 04 for original test case.

I am going to mark this as "RESOLVED CONFIGURATION CHANGED". Thanks!