Opened 14 years ago

Closed 14 years ago

Last modified 10 years ago

#3542 closed bug (fixed)

Inline styles not removed after sorting

Reported by: antin Owned by: paul
Priority: minor Milestone:
Component: ui.sortable Version: 1.6rc2
Keywords: Cc:
Blocked by: Blocking:


This is related to ticket #3491. During the sort process a bunch of inline styles are applied to the element and while they are 'reset' they are not removed after the sorting is complete.

The particular issue I am having is due to the opacity being set during drag. Once the element has finished sorting jquery simply 'clears' the filter style, but actually leaves it there. Unfortunately as soon as the filter style is present (even if it is blank) IE 7 stops anti-aliasing the text.

Ticket #3491 has been closed and marked 'wontfix' which I believe to be a mistake. There is a very simple fix that would satisfy everyone.

At the very top of the _mouseStart function simply save a copy of the inline style on the element prior to sort:

o._style = $(this.currentItem).attr('style');

And then at the bottom of the _mouseStop function revert to the original style:

$(this.currentItem).attr('style', this.options._style);

This way the style can be modified without concern during the drag process and there is no need to 'carefully' undo all the minor changes at the end.

Change History (3)

comment:1 Changed 14 years ago by Scott González

Component: ui.coreui.sortable

comment:2 Changed 14 years ago by paul

Resolution: fixed
Status: newclosed

Already fixed in a different way, but the result is the same :) Cheers, Paul

comment:3 Changed 10 years ago by Scott González

Milestone: TBD

Milestone TBD deleted

Note: See TracTickets for help on using tickets.