Skip to main content

Search and Top Navigation

#6958 closed bug (notabug)

Opened February 09, 2011 02:34PM UTC

Closed November 08, 2012 12:48PM UTC

Sortable gets confused if you have matching elements with display: none

Reported by: neilbowers Owned by: neilbowers
Priority: minor Milestone: 2.0.0
Component: ui.sortable Version: 1.8.9
Keywords: Cc:
Blocked by: Blocking:
Description

I have a container which contains multiple elements with class Foobar.

Some of the child elements can be hidden, which I achieve with display: none.

But drag and drop gets confused by the non-displayed elements which still have the matching class.

I'm currently working round this by changing the className when I hide the elements,

and restoring it when they come back "on screen".

Attachments (0)
Change History (4)

Changed October 11, 2012 02:54PM UTC by scottgonzalez comment:1

milestone: 1.9.02.0.0

Changed November 08, 2012 02:48AM UTC by mikesherov comment:2

owner: → neilbowers
status: newpending

Thanks for taking the time to contribute to the jQuery UI project! Please provide a complete reduced test case on jsFiddle to help us assess your ticket. I'm not sure what "gets confused" means, and the specifics of the situation in which you encountered this bug.

Additionally, be sure to test against the git version of both jQuery UI and jQuery to ensure the issue still exists. To get you started, use this boilerplate: http://jsfiddle.net/ZgAqH/ Open the link and click to "Fork" (in the top menu) to get started.

Changed November 08, 2012 11:39AM UTC by neilbowers comment:3

status: pendingnew

Here's a jsfiddle: http://jsfiddle.net/tXvX9/

That wasn't a very good bug report, was it. Sorry.

I've just tested with a much more recent jQuery and jQuery UI. In my example, one element (tile #4) has display: none.

The only point I might make now is that the serialize is including tile 4 in the serialization.

My vague recollection is that it was more than just the serialization issue, but whatever it might have been, I'm not seeing it now.

Changed November 08, 2012 12:48PM UTC by scottgonzalez comment:4

resolution: → notabug
status: newclosed

I'd say that's working as expected with the serialization, since it is still a valid item according to the items option. I'll close as notabug since we're not sure what exactly was being reported.