Skip to main content

Search and Top Navigation

#5040 closed bug (worksforme)

Opened January 05, 2010 05:04PM UTC

Closed November 06, 2012 03:13AM UTC

Safari jQuery UI sortable loses behavior when showing/hiding container elements

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

$(".someUl").sortable({ ... }).disableSelection();

$(".containerOfSomeUl").hide();

$(".someButton").click(function() {

$(".containerOfSomeUl").show();

});

The above works fine in Firefox and IE, but not in Safari (but Chrome works). After I hide and later show the container, someUl loses all sortable behavior and does not work. I googled and found there were some problems around Webkit and sortable, but those were older and appeared to be fixed.

It is specifically about showing and hiding the container. If the container is visible at all times, sortable works fine in Webkit, but this is not what I need. I would like to show and hide the container while keeping sortable working at all times.

Ideas for fix/workaround so it would also work in Safari?

See a live demo with the bug at: http://www.jaanuskase.com/stuff/sortableBug/

This works OK on Firefox and Chrome, does not work with Safari. You see that the sortable code is run on page load. I thought that it might help to instead run it when the sortable element becomes visible, but there's no difference (if I did that, it still works with Firefox, doesn't with Safari).

Attachments (0)
Change History (2)

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

milestone: TBD2.0.0

Changed November 06, 2012 03:13AM UTC by mikesherov comment:2

resolution: → worksforme
status: newclosed

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 in the lowest version of Safari that we support. http://www.jaanuskase.com/stuff/sortableBug/

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