Ticket #7716 (closed bug: fixed)

Opened 3 years ago

Last modified 3 years ago

Selectable: new elements added programatically don't have class ui-selectee

Reported by: millermedeiros Owned by: rdworth
Priority: minor Milestone: 1.8.17
Component: ui.selectable Version: 1.8.16
Keywords: Cc:
Blocking: Blocked by:

Description

adding new elements to the selectable list using append and appendTo won't update class names, causing styling conflicts.

here is a working example and more info:  http://jsfiddle.net/Lhgua/

Change History

comment:1 Changed 3 years ago by ghostd

One fix is to put '$this.addClass("ui-selectee");' inside the refresh method, and remove 'this.selectees = selectees.addClass("ui-selectee");' from the '_create' method.

@millermedeiros Whatever the fix will be, you'll have to call 'refresh' since 'append' method is a jQuery core method, and not part of jQuery UI (unless than jQuery UI override this method or use the MutationEvent to do more work)

comment:2 Changed 3 years ago by rdworth

  • Owner set to rdworth
  • Status changed from new to assigned
  • Summary changed from new elements added programatically don't have class ui-selectee to Selectable: new elements added programatically don't have class ui-selectee

comment:3 Changed 3 years ago by Richard D. Worth

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

Selectable: add ui-selectee class to elements matching filter on refresh. Fixes #7716 - Selectable: new elements added programatically don't have class ui-selectee

Changeset: 97bc2d9de9875e222254cfa1cd3fa3bde605c2ed

comment:4 Changed 3 years ago by Richard D. Worth

Selectable: add ui-selectee class to elements matching filter on refresh. Fixes #7716 - Selectable: new elements added programatically don't have class ui-selectee (cherry picked from commit 97bc2d9de9875e222254cfa1cd3fa3bde605c2ed)

Changeset: e9002c4c8f04266497926419034ea44f62725bcf

comment:5 Changed 3 years ago by rdworth

  • Milestone changed from 1.9 to 1.8.17
Note: See TracTickets for help on using tickets.