#8086 closed bug (worksforme)
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
Change History (4)
comment:1 follow-up: 2 Changed 12 years ago by
Resolution: | → worksforme |
---|---|
Status: | new → closed |
comment:2 Changed 12 years ago by
Replying to 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.
comment:3 Changed 12 years ago by
Different browsers have different logic for selection/focus when preventing the default action in mousedown.
comment:4 Changed 11 years ago by
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.