Opened 12 years ago

Closed 12 years ago

Last modified 9 years ago

#2991 closed bug (wontfix)

Sortable: Growing table bug in FireFox

Reported by: gordon Owned by: paul
Priority: major Milestone: 1.5.1
Component: ui.sortable Version: 1.5
Keywords: Cc:
Blocked by: Blocking:

Description

In FireFox, certain conditions can cause tables to grow by one pixel per sort if they have a sortable applied to them.

Attachments (1)

sortable.html (6.3 KB) - added by gordon 12 years ago.
Demonstration of the problem

Download all attachments as: .zip

Change History (5)

Changed 12 years ago by gordon

Attachment: sortable.html added

Demonstration of the problem

comment:1 Changed 12 years ago by paul

Resolution: wontfix
Status: newclosed

This seems to be a Gecko issue, and I couldn't find out why it happens - but it's definitely a rendering bug. There is a hotfix though - if you set and reset the position from static to absolute on the tbody, it will fix itself.

$('.questionGrid tbody').sortable({

handle: '.sortHandle', helper: function() {

return $("<div>Sorting..</div>")[0];

}, start: function() {

$(this).css("position", "relative");

}, stop: function() {

$(this).css("position", "");

}

});

comment:2 Changed 12 years ago by paul

Milestone: 1.51.5.1

comment:3 Changed 10 years ago by netsuke

The same thing happens in Chrome, and the proposed workaround does not work.

comment:4 Changed 9 years ago by avuori

Yes, this is a quite annoying problem.

As a weak workaround, I found out that in the stop callback, the following prevents the table growth.

$(this).closest("table").hide();
var that = this;
window.setTimeout(function () {
    $(that).closest("table").show();
}, 0);

Interestingly, the setTimeout is needed for it to work. The big price of the workaround is that this causes flickering. The workaround was tested in Chrome.

Note: See TracTickets for help on using tickets.