Skip to main content

Search and Top Navigation

#5656 closed bug (invalid)

Opened May 25, 2010 05:14PM UTC

Closed November 22, 2012 09:23AM UTC

peculiarity with right-aligned sortable items

Reported by: fajeuqwrhf Owned by: fajeuqwrhf
Priority: minor Milestone: 2.0.0
Component: ui.sortable Version: 1.8.1
Keywords: right Cc:
Blocked by: Blocking:
Description

When assigning Sortable to a list of horizontal right-aligned items (by "float: right" or by "direction:rtl"), it does not work as expected and react strangely to the user's actions.

For example, go to here: http://jqueryui.com/demos/sortable/display-grid.html

and change the css to #sortable li { float: right; }

Attachments (0)
Change History (5)

Changed December 24, 2010 02:29PM UTC by wael34218 comment:1

_comment0: I fixed it using the following changes: \ \ in ui.sortable.js \ change "getDragHorizontalDirection" function to: \ \ _getDragHorizontalDirection: function() { \ var delta = this.positionAbs.left - this.lastPositionAbs.left; \ if(this.floatingdirection == "left") \ return delta != 0 && (delta > 0 ? "right" : "left"); \ else \ return delta != 0 && (delta > 0 ? "left" : "right"); \ } \ \ and define this.floatingdirection in constructor function "_init" by adding the following line: \ \ this.floatingdirection = this.items[0].item.css('float');1293203297007763

Changed October 31, 2011 01:52PM UTC by jenyay comment:2

I'm having the same issue when items has float set to right. The bug can be viewed here:

http://jsfiddle.net/jenyay/2VHnp/

Changed October 11, 2012 09:07PM UTC by scottgonzalez comment:3

milestone: TBD2.0.0

Changed November 08, 2012 01:57AM UTC by mikesherov comment:4

owner: → fajeuqwrhf
status: newpending

Thanks for taking the time to contribute to the jQuery UI project! I can no longer reproduce the issue using the latest jQuery and jQuery UI using the info provided. http://jsfiddle.net/7mkEg/1/

If you can still reproduce it, please feel free to reply to this ticket with a test case showing the problem. Thanks!

Changed November 22, 2012 09:23AM UTC by trac-o-bot comment:5

resolution: → invalid
status: pendingclosed

Because we get so many tickets, we often need to return them to the initial reporter for more information. If that person does not reply within 14 days, the ticket will automatically be closed, and that has happened in this case. If you still are interested in pursuing this issue, feel free to add a comment with the requested information and we will be happy to reopen the ticket if it is still valid. Thanks!