#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)
Change History (5)
Changed 15 years ago by
Attachment: | sortable.html added |
---|
comment:1 Changed 15 years ago by
Resolution: | → wontfix |
---|---|
Status: | new → closed |
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 15 years ago by
Milestone: | 1.5 → 1.5.1 |
---|
comment:3 Changed 13 years ago by
The same thing happens in Chrome, and the proposed workaround does not work.
comment:4 Changed 12 years ago by
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.
Demonstration of the problem