Ticket #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: | |
| Blocking: | Blocked by: |
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
Change History
Changed 3 years ago by AzaToth
-
attachment
0001-Subpixel-rendering.patch
added
Eventual implementation
comment:1 follow-up: ↓ 2 Changed 3 years ago by paul.irish
You can do a bitwise equivalent of Math.floor(num) with num
comment:2 in reply to: ↑ 1 Changed 3 years ago by paul.irish
Replying to paul.irish: You can do a bitwise equivalent of Math.floor(num) with ~~num
comment:3 Changed 3 years ago by scott.gonzalez
- Status changed from new to closed
- Resolution set to fixed
Fixed in 9541bd0bf2ca72795e8f2b2c1d3accc32afcac96 using parseInt() which is what core does for pixel values.
comment:5 Changed 3 years ago by gethinw
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

