#3661 closed bug (invalid)
ui/sortable(): dragged element has incorrect position due to body-margin
Reported by: | O'RLY | Owned by: | flesler |
---|---|---|---|
Priority: | major | Milestone: | 1.3 |
Component: | unfiled | Version: | 1.2.6 |
Keywords: | Cc: | O'RLY | |
Blocked by: | Blocking: |
Description
jquery-ui/sortable() Happens both in IE and Firefox
When i start dragging the DIV element on the page with nonzero body margin, the dragging helper object displays with a top&left offset from its original position which creates an unpleasant "jumping" effect.
Seems like this is caused by the incorrect calculation of helper object position which starts offset summation from document edge ignoring the body margins. This causes the helper object to jump from it's original position by the distance equal to respective body margins.
Sample code to reproduce: NOTE: Body margin must have non-zero values
<div class="dragContainer" style="height: 200px; width: 800px; background-color: Red;">
<div class="dragDiv" style="height: 20px;width: 500px;background-color:Yellow; border:solid 1px green"></div> <div class="dragDiv" style="height: 20px;width: 500px;background-color:Yellow; border:solid 1px green"></div> <div class="dragDiv" style="height: 20px;width: 500px;background-color:Yellow; border:solid 1px green"></div> <div class="dragDiv" style="height: 20px;width: 500px;background-color:Yellow; border:solid 1px green"></div> <div class="dragDiv" style="height: 20px;width: 500px;background-color:Yellow; border:solid 1px green"></div> <div class="dragDiv" style="height: 20px;width: 500px;background-color:Yellow; border:solid 1px green"></div> <div class="dragDiv" style="height: 20px;width: 500px;background-color:Yellow; border:solid 1px green"></div>
</div> <script type="text/javascript">
$(".dragContainer").sortable({
distance: 1, axis: "y"
});
</script>
Change History (1)
comment:1 Changed 14 years ago by
Cc: | O'RLY added |
---|---|
Resolution: | → invalid |
Status: | new → closed |
This belongs to the UI Bug Tracker.