diff options
author | Scott González <scott.gonzalez@gmail.com> | 2010-03-26 19:53:43 -0400 |
---|---|---|
committer | Scott González <scott.gonzalez@gmail.com> | 2010-03-26 19:53:43 -0400 |
commit | 9541bd0bf2ca72795e8f2b2c1d3accc32afcac96 (patch) | |
tree | 452da6246365c2022b80ed812e4765a9eb655dbb /tests/unit/position/position_core.js | |
parent | b297b3fa6a1e4b6cba735a10ca03a6175f8eda3a (diff) | |
download | jquery-ui-9541bd0bf2ca72795e8f2b2c1d3accc32afcac96.tar.gz jquery-ui-9541bd0bf2ca72795e8f2b2c1d3accc32afcac96.zip |
Position: Use parseInt() to prevent fractional pixel values.
Fixes #5280 - ui.position generates different position in static context.
Diffstat (limited to 'tests/unit/position/position_core.js')
-rw-r--r-- | tests/unit/position/position_core.js | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/unit/position/position_core.js b/tests/unit/position/position_core.js index 4d2716ced..57e02da0a 100644 --- a/tests/unit/position/position_core.js +++ b/tests/unit/position/position_core.js @@ -330,4 +330,22 @@ test("collision: none, with offset", function() { }, { top: -13, left: -12 }, "left top, negative offset"); }); +//test('bug #5280: consistent results (avoid fractional values)', function() { +// var wrapper = $('#bug-5280'), +// elem = wrapper.children(), +// offset1 = elem.position({ +// my: 'center', +// at: 'center', +// of: wrapper, +// collision: 'none' +// }).offset(), +// offset2 = elem.position({ +// my: 'center', +// at: 'center', +// of: wrapper, +// collision: 'none' +// }).offset(); +// same(offset1, offset2); +//}); + })(jQuery); |