#4993 closed bug (worksforme)
offset() and position() return wrong values in Chrome when page is zoomed
Reported by: | gkertesz | Owned by: | brandon |
---|---|---|---|
Priority: | major | Milestone: | |
Component: | offset | Version: | 1.3.2 |
Keywords: | chrome zoom | Cc: | |
Blocked by: | Blocking: |
Description
offset() and position() return true pixel values in Google Chrome at all page zoom levels.
In contrast, in FF, IE and Opera they return values compensated for the actual page zoom.
Attachments (1)
Change History (14)
Changed 14 years ago by
comment:1 Changed 13 years ago by
comment:2 Changed 13 years ago by
Looks like they've fixed the issue in webkit https://bugs.webkit.org/show_bug.cgi?id=25750
comment:3 Changed 12 years ago by
Resolution: | → worksforme |
---|---|
Status: | new → closed |
This should be fixed in all currently support versions of Chrome (7+). Please reopen if this is not the case.
comment:4 Changed 11 years ago by
In 2012, this seems to be broken again. I'm using jquery ui autocomplete in Chrome 17:
http://stackoverflow.com/questions/3638688/jqueryui-autocomplete-suggestions-misplaced-in-chrome
comment:5 Changed 10 years ago by
I am experiencing this issue as well, I've upgraded to latest versions of jquery but it hasn't made a difference
comment:6 Changed 10 years ago by
I am experiencing this issue too using:
$(selector).animate({left: '-=' + value}, 200)
does not return the correct 'left' value when zoomed but the code:
$(selector).css('left')
does return the correct value.
comment:8 Changed 10 years ago by
Comment 7 pretty much sums up the problems that I've been having with even the latest versions of jQuery. The behavior is slightly different but just as problematic when zoomed out. I've noticed that browsers using the Webkit engine are affected, and IE and Firefox have no such issues.
comment:9 Changed 10 years ago by
I am experiencing this problem too - with Chrome version 23.
Same as comment 6 & 7
comment:10 Changed 10 years ago by
Filed a bug in webkit: https://bugs.webkit.org/show_bug.cgi?id=105979
comment:11 Changed 10 years ago by
Adam, thanks for filing the WebKit bug. You have a typo in the title: getComputerdStyle.
comment:12 Changed 10 years ago by
There is progress! https://bugs.webkit.org/show_bug.cgi?id=105979
comment:13 Changed 10 years ago by
Here's one for .css('left') I happened to stumble accross.. well, guess I'm waiting for it to be fixed. http://jsfiddle.net/RaznH/1/
This is because getBoundingClientRect is buggy in webkit (same issue exists in Safari 4). I'm guessing it's returning the rect after the zoom has been applied.
To fix the issue, avoid getBoundingClientRect in webkit.
Cheers, Jake.