Search and Top Navigation
#5280 closed bug (fixed)
Opened March 04, 2010 10:16PM UTC
Closed March 26, 2010 11:58PM UTC
Last modified October 03, 2010 01:49PM UTC
ui.position generates different position in static context
Reported by: | AzaToth | Owned by: | |
---|---|---|---|
Priority: | critical | Milestone: | 1.8.1 |
Component: | ui.position | Version: | 1.8rc3 |
Keywords: | wobbling | Cc: | |
Blocked by: | Blocking: |
Description
as seen in http://jsbin.com/itato4/14, if a span in a div has a call to position executed twice, it wont get the same position in the second call.
In a loop it becomes a "wobbling" effect (unwanted often).
Visible in firefox, not visible in chrome.
Attachments (3)
Change History (5)
Changed March 26, 2010 08:41PM UTC by comment:1
Changed March 26, 2010 08:42PM UTC by comment:2
Replying to [comment:1 paul.irish]:
You can do a bitwise equivalent of Math.floor(num)
with ~~num
Changed March 26, 2010 11:58PM UTC by comment:3
resolution: | → fixed |
---|---|
status: | new → closed |
Fixed in 9541bd0bf2ca72795e8f2b2c1d3accc32afcac96 using parseInt() which is what core does for pixel values.
Changed April 21, 2010 01:18PM UTC by comment:4
milestone: | 1.9 → 1.8.1 |
---|
Changed August 09, 2010 11:16AM UTC by comment:5
Is there a reason why parseInt() was used rather than Math.round()? This choice can cause 1px offset issues in Firefox where decimal values >= .5 are concerned. See http://jsbin.com/uceje4/2
You can do a bitwise equivalent of Math.floor(num) with ~~num