Fix table column resizing during row dragging
authorMatthias Schmidt <gravatronics@live.com>
Wed, 6 Apr 2016 16:51:00 +0000 (18:51 +0200)
committerMatthias Schmidt <gravatronics@live.com>
Wed, 6 Apr 2016 16:51:00 +0000 (18:51 +0200)
wcfsetup/install/files/js/WCF.js

index aa58bf8c1e9b0ae9cf61d7ad968cb9fb17101399..d4ee88c007affc15e52f4c725a73071d2dfe48f4 100755 (executable)
@@ -6783,6 +6783,16 @@ WCF.Sortable.List = Class.extend({
                var sortableList = $('#' + this._containerID + ' .sortableList');
                if (sortableList.is('tbody') && this._options.helper === 'clone') {
                        this._options.helper = this._tableRowHelper.bind(this);
+                       
+                       // explicitly set column widths to avoid column resizing during dragging
+                       var thead = sortableList.prev('thead');
+                       if (thead) {
+                               thead.find('th').each(function(index, element) {
+                                       element = $(element);
+                                       
+                                       element.width(element.width());
+                               });
+                       }
                }
                
                if (isSimpleSorting) {