Ticket #7741 (closed bug: fixed)

Opened 3 years ago

Last modified 3 years ago

ui.sortable is not working when it is extended

Reported by: TomWolk Owned by:
Priority: minor Milestone: 1.8.17
Component: ui.sortable Version: 1.8.15
Keywords: Cc:
Blocking: Blocked by:

Description

I extended the ui.sortable widget to add some additional functionality. I gave the new widget a new name so I can still use the original sortable.

But with a new name 2 methods stopped working because the name of the widget was hard coded in those methods.

I changed the line

var inst = $.data(cur[j], 'sortable');

to

var inst = $.data(cur[j], this.widgetName);

in the methods

_getItemsAsjQuery and _refreshItems

and now it works!

Greetings Thomas

Change History

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

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

Sortable: replaced hard-coded sortable with this.widgetName, and removed lines from destroy that are handled by super. Fixes #7741 - ui.sortable is not working when it is extended

Changeset: 228b1b191b4f668a74e7005fc9c8c9250c090aa9

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

Sortable: replaced hard-coded sortable with this.widgetName, and removed lines from destroy that are handled by super. Fixes #7741 - ui.sortable is not working when it is extended (cherry picked from commit 228b1b191b4f668a74e7005fc9c8c9250c090aa9)

Changeset: 5c6cfe2645588e6a3d3f1ed002534d454209e33f

comment:3 Changed 3 years ago by rdworth

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