#7415 closed bug (fixed)
Sortable: Incorrect revert animation with axis: "y"
Reported by: | pk_745 | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | 1.10.2 |
Component: | ui.sortable | Version: | 1.8.13 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
Sortable bounces back in IE8,Chrome and Safari with revert true option. IE version: 8.0.6001.18702C0 Chrome: 10.0.648.151 Safari: 5.0.4(7533.20.27) Firefox(4.0) works perfectly.
Bug description: <ul> <li><img src="1.jpg" /></li> <li><img src="2.jpg" /></li> <li><img src="3.jpg" /></li> </ul>
Try following jQuery code: var options = {}; options.axis = "y"; options.containment = "parent"; options.cursor = "crosshair"; options.tolerance = "pointer"; options.revert = "true"; $('ul').sortable(options);
CSS: ul {list-style:none;}
- In IE8,Chrome and Safari this code doesn't work properly. While sorting, image bounces back and then realign(sort) to proper place.Code is very simple, developer can try by just copy and paste.
Change History (6)
comment:1 Changed 11 years ago by
comment:2 Changed 10 years ago by
Milestone: | 1.9.0 → 2.0.0 |
---|
comment:3 Changed 10 years ago by
Status: | new → open |
---|---|
Summary: | sortable bounces back in IE8,Chrome and Safari with revert true option → Sortable: bounces back in IE8,Chrome and Safari with revert true option |
confirmed on latest in chrome: http://jsfiddle.net/KNDJY/
comment:4 Changed 10 years ago by
Summary: | Sortable: bounces back in IE8,Chrome and Safari with revert true option → Sortable: Incorrect revert animation with axis: "y" |
---|
The only options that matter are axis: "y"
& revert: true
http://jsfiddle.net/tj_vantoll/fKTST/.
This occurs in the latest version of Chrome, Safari, and Opera as well as IE 7 - 10. Very interestingly it does not occur in Firefox.
comment:5 Changed 10 years ago by
Resolution: | → fixed |
---|---|
Status: | open → closed |
Sortable: Only animate along the specified axis when reverting. Fixes #7415 - Sortable: Incorrect revert animation with axis: 'y'.
Changeset: 054449e214449ec5578fe71bb67b9a670adac828
comment:6 Changed 10 years ago by
Milestone: | 2.0.0 → 1.10.2 |
---|
A very annoying bug with a very simple fix. I'm not using GitHub, so here's patch if anyone is interested:
ui/jquery.ui.sortable.js
if(!this.options.axis || this.options.axis != "y") this.helper[0].style.left = this.position.left+'px';if(!this.options.axis || this.options.axis != "x") this.helper[0].style.top = this.position.top+'px';