Skip to main content

Search and Top Navigation

#6000 closed bug (fixed)

Opened August 28, 2010 06:33PM UTC

Closed December 01, 2010 04:23PM UTC

Last modified December 08, 2010 06:36PM UTC

Position: Sometimes positioning is off by 1px in Firefox

Reported by: gethinw Owned by:
Priority: minor Milestone: 1.8.7
Component: ui.position Version: 1.8.4
Keywords: Cc:
Blocked by: Blocking:
Attachments (0)
Change History (10)

Changed October 22, 2010 03:27AM UTC by scottgonzalez comment:1

resolution: → fixed
status: newclosed

Fixed in 32264f7.

Changed October 22, 2010 07:25PM UTC by scottgonzalez comment:2

resolution: fixed
status: closedreopened

Reverted in a0847f3 since this caused a lot of unit tests to fail.

Changed November 19, 2010 06:26PM UTC by Scott González comment:3

resolution: → fixed
status: reopenedclosed

Position: Handle sub-pixel offsets better in Firefox. Fixes #6000 - Position: Sometimes positioning is off by 1px in Firefox.

Changeset: 32264f7ad12609b316189fd013cda63b41c8b271

Changed November 19, 2010 06:26PM UTC by Scott González comment:4

Revert "Position: Handle sub-pixel offsets better in Firefox. Fixes #6000 - Position: Sometimes positioning is off by 1px in Firefox."

This reverts commit 32264f7ad12609b316189fd013cda63b41c8b271.

Changeset: a0847f3a08dfc259d8ba7f6ba7da16653cf15183

Changed November 19, 2010 06:47PM UTC by scottgonzalez comment:5

resolution: fixed
status: closedreopened

Changed November 24, 2010 08:05PM UTC by inukshuk comment:6

_comment0: Using parseInt I have encountered a number of off-by-one pixel issues in all non-webkit browsers; using Math.round instead, the results seem stable across all browsers. I could not confirm the unit test failures, either. Can you tell me exactly which test are failing, or, alternatively, a case where using Math.round causes a wrong or inconsistent result?1290629172975086

Using parseInt I have encountered a number of off-by-one pixel issues in non-webkit browsers (FF and IE7/8); using Math.round instead, the results seem stable across all browsers. I could not confirm the unit test failures, either. Can you tell me exactly which test are failing, or, alternatively, a case where using Math.round causes a wrong or inconsistent result?

Changed December 01, 2010 04:22PM UTC by scottgonzalez comment:7

I can't reproduce the failures now either. I even tried going back to jQuery 1.4.3 and that didn't cause any failures either. I remember having a ton of failures (and I could consistently reproduce back then), but maybe I had something else modified...

Changed December 01, 2010 04:23PM UTC by Scott González comment:8

resolution: → fixed
status: reopenedclosed

Position: Handle sub-pixel offsets better in Firefox. Fixes #6000 - Position: Sometimes positioning is off by 1px in Firefox.

Changeset: c667cff22d8ef352b81338e2834379678fb2dd27

Changed December 08, 2010 03:46PM UTC by inukshuk comment:9

Scott! Meanwhile, I have encountered a similar problem to #5280 with the 'wobbly' behaviour; this was caused by setOffset in offset.js of core using parseInt instead of parseFloat (to explain: ui-autocomplete would write fractions into the CSS which were then parsed back if autocomplete was executed a second time, thereby causing the 'wobbling' effect). Using parseFloat in setOffset seems like the best fix to this problem, however, as I understand it, this would make the workaround of #5280 and #6000 superflous, or in the worst case even buggy.

I have tried to remove the two lines completely (while also using parseFloat in core) and have not encountered the problem since. If core decides to use parseFloat instead of parseInt I would suggest removing the two lines from ui-position entirely.

Also see http://bugs.jquery.com/ticket/7730

Changed December 08, 2010 06:36PM UTC by scottgonzalez comment:10

milestone: 1.91.8.7