#5280 closed bug (fixed)
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 (8)
comment:1 follow-up: 2 Changed 13 years ago by
You can do a bitwise equivalent of Math.floor(num) with num
comment:2 Changed 13 years ago by
Replying to paul.irish:
You can do a bitwise equivalent of Math.floor(num)
with ~~num
comment:3 Changed 13 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
Fixed in 9541bd0bf2ca72795e8f2b2c1d3accc32afcac96 using parseInt() which is what core does for pixel values.
comment:4 Changed 13 years ago by
Milestone: | 1.9 → 1.8.1 |
---|
comment:5 Changed 13 years ago by
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