rniemeyer / knockout-sortable

A Knockout.js binding to connect observableArrays with jQuery UI sortable functionality
MIT License
548 stars 128 forks source link

jQueryUI helper option broken in 0.12.0 and above #172

Closed derrickb closed 7 years ago

derrickb commented 8 years ago

Here are two identical jsfiddles.

This one shows the "helper" option working in 0.11.0: https://jsfiddle.net/derrickb/4q0fdquz/

This one shows it NOT working in 0.12.0, this was also tested with all subsequent versions: https://jsfiddle.net/derrickb/bbu92mef/

If I comment out this code that was added in 0.12.0 at line 158, the helper function works again:

//ensure draggable table row cells maintain their width while dragging
sortable.options.helper = function(e, ui) {
    if (ui.is("tr")) {
        ui.children().each(function() {
            $(this).width($(this).width());
         });
     }
     return ui;
};
rniemeyer commented 8 years ago

@derrickb - thanks for the report. I'll change it to only apply a default helper, if none is provided.

rniemeyer commented 7 years ago

@derrickb - This was is fixed in the v0.15.0. Thanks for reporting it.