Side navigation
#4993 closed bug (worksforme)
Opened July 29, 2009 09:41PM UTC
Closed November 17, 2010 05:01AM UTC
Last modified May 28, 2013 05:27AM UTC
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 (13)
Changed August 14, 2009 11:42AM UTC by comment:1
Changed August 14, 2009 11:44AM UTC by comment:2
Looks like they've fixed the issue in webkit https://bugs.webkit.org/show_bug.cgi?id=25750
Changed November 17, 2010 05:01AM UTC by comment:3
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.
Changed March 14, 2012 04:02PM UTC by comment:4
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
Changed September 27, 2012 01:00PM UTC by comment:5
I am experiencing this issue as well, I've upgraded to latest versions of jquery but it hasn't made a difference
Changed October 15, 2012 10:38PM UTC by comment:6
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.
Changed October 15, 2012 11:03PM UTC by comment:7
Here is the Fiddle for the example above
Changed October 22, 2012 05:29PM UTC by comment:8
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.
Changed January 02, 2013 03:53PM UTC by comment:9
I am experiencing this problem too - with Chrome version 23.
Same as comment 6 & 7
Changed January 03, 2013 01:46AM UTC by comment:10
Filed a bug in webkit: https://bugs.webkit.org/show_bug.cgi?id=105979
Changed January 03, 2013 01:57AM UTC by comment:11
Adam, thanks for filing the WebKit bug. You have a typo in the title: getComputerdStyle.
Changed February 16, 2013 02:15AM UTC by comment:12
There is progress! https://bugs.webkit.org/show_bug.cgi?id=105979
Changed May 28, 2013 05:27AM UTC by comment:13
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.