fix #2434 - wrong calculation of offset#2437
Conversation
|
Does something block this commit to be merged? |
|
Are you using sub pixels when setting the left and top? |
|
Update the PR to use |
|
The problem mostly occurs on slideshows if you use an element centered with auto margins within an element of odd width or using percents in width/padding. The pull request has been updated. |
|
This is going to be on hold, until we get a spec to check for this. You're welcome to add one yourself, or wait about a week to get a hold of the pending PR that reduces the complexity to test MooTools. |
|
I have rebased the previous commit and written a test spec. PhantomJS version 1.9.8 used by the karma runner is based on a webkit version released around 2011 before subpixel alignment was added to webkit. Is a test spec needed for this change? If the browser itself does not support subpixel alignment it is just fine, but I can't think of a way to test this usefully without breaking the PhantomJS build … If something is missing please let me know. |
|
LGTM but travis failed |
|
Travis fails on PhantomJS tests. We could add a bypass to phantom.js in the specs for this. |
|
The test case has been modified to compare the result of getPosition with the output of getBoundingClientRect. |
fix #2434 - wrong calculation of offset
Fixes the bug described in #2434
Offsets are rounded correctly now