Skip to content

Commit

Permalink
Fix sortable inlines changes detection for select element.
Browse files Browse the repository at this point in the history
Related to #232
  • Loading branch information
darklow committed Jun 19, 2014
1 parent 51affa3 commit fefdf79
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions suit/static/suit/js/sortables.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,10 @@
// Filters out unchanged selects and sortable field itself
function filter_unchanged(i, input) {
if (input.type == 'select-one' || input.type == 'select-multiple') {
for (var j = 0; j < input.options.length; j++) {
if (input.options[j].selected == input.options[j].defaultSelected) {
var options = input.options, option;
for (var j = 0; j < options.length; j++) {
option = options[j];
if (option.selected && option.selected == option.defaultSelected) {
return false;
}
}
Expand Down

0 comments on commit fefdf79

Please sign in to comment.