Search and Top Navigation
#8086 closed bug (worksforme)
Opened February 01, 2012 01:25PM UTC
Closed February 01, 2012 01:53PM UTC
Last modified May 04, 2012 08:09PM UTC
Cancel sorting disables select element
Reported by: | cagdase | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | 1.9.0 |
Component: | ui.sortable | Version: | 1.8.17 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
I have implemented a sortable list according to the demo page http://jqueryui.com/demos/sortable/#items
My addition was a select element and checkbox for dynamically enabling or disabling the list item. The problem is: If I used the second method in the demo to cancel elements but keep them as drop targets, select elements inside sortable items become useless. There is no problem with the first method. It happens in chrome 16 and IE 8/9. Firefox 9 seems to be not affected by this bug.
Simply
$( "#sortable1" ).sortable({
items: "li:not(.ui-state-disabled)"
});
works fine but
$( "#sortable2" ).sortable({
cancel: ".ui-state-disabled"
});
somehow prevents select element from functioning.
See my demo page: http://www.1v1y.com/sorting.html
Attachments (0)
Change History (4)
Changed February 01, 2012 01:53PM UTC by comment:1
resolution: | → worksforme |
---|---|
status: | new → closed |
Changed February 01, 2012 02:20PM UTC by comment:2
Replying to [comment:1 scott.gonzalez]:
You also want to cancel on :input, which is the default cancel value.
$( "#sortable2" ).sortable({
cancel: ".ui-state-disabled,:input"
});
fixes the problem. But there is still the question, why does FF behaves differently?
Anyway, thank you.
Changed February 01, 2012 02:23PM UTC by comment:3
Different browsers have different logic for selection/focus when preventing the default action in mousedown.
Changed May 04, 2012 08:09PM UTC by comment:4
I have implemented a sortable list according to the demo page http://jqueryui.com/demos/sortable/#items My addition was a select element and checkbox for dynamically enabling or disabling the list item. The problem is: If I used the second method in the demo to cancel elements but keep them as drop targets, select elements inside sortable items become useless. There is no problem with the first method. It happens in chrome 16 and IE 8/9. Firefox 9 seems to be not affected by this bug.
Simply $( "#sortable1" ).sortable({
items: "li:not(.ui-state-disabled)"
}); works fine but $( "#sortable2" ).sortable({
cancel: ".ui-state-disabled"
}); somehow prevents select element from functioning.
See my demo page: http://www.yuceyazilim.com.tr
See my demo page: http://www.yedekparcaprogrami.com
You also want to cancel on :input, which is the default cancel value.