Ticket #3542 (closed bug: fixed)

Opened 6 years ago

Last modified 23 months ago

Inline styles not removed after sorting

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

Description

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

comment:1 Changed 6 years ago by scott.gonzalez

  • Component changed from ui.core to ui.sortable

comment:2 Changed 6 years ago by paul

  • Status changed from new to closed
  • Resolution set to fixed

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

comment:3 Changed 23 months ago by scott.gonzalez

  • Milestone TBD deleted

Milestone TBD deleted

Note: See TracTickets for help on using tickets.