Opened 11 years ago

Closed 7 years ago

#4253 closed bug (duplicate)

Sortable: ui.helper is null when receiving a draggable clone

Reported by: fosslin Owned by:
Priority: major Milestone: 2.0.0
Component: ui.sortable Version: 1.6rc6
Keywords: sortable, receive, callback, draggable Cc:
Blocked by: Blocking:

Description

take this for instance.. if i change from receive to stop or update it will work perfectly... but when having that 'receive' it doesn't do s* (so).

$(".draggable").draggable({   
	connectToSortable:  '.sortable',
	helper: 'clone'
});			


$(".sortable").sortable({   
	receive : function(e,ui) {
		ui.item.text("hello there, litlle you..");
		}
       });

Change History (10)

comment:1 Changed 11 years ago by fosslin

problem is: ui.item is undefined when using callback receive from a draggable list. but not fram a sortable list!

comment:2 Changed 10 years ago by Jörn Zaefferer

Milestone: TBD1.7.2

comment:3 Changed 10 years ago by Jörn Zaefferer

Milestone: 1.7.21.8

comment:4 Changed 10 years ago by paul

Priority: minormajor

comment:5 Changed 9 years ago by petersendidit

comment:6 Changed 7 years ago by Scott González

Milestone: 1.9.02.0.0

comment:7 Changed 7 years ago by petersendidit

Status: newopen
Summary: callback receive ain't receiving from draggableSortable: callback receive ain't receiving from draggable

comment:8 Changed 7 years ago by tj.vantoll

Resolution: worksforme
Status: openclosed

I cannot recreate this issue with neither the latest jQuery UI version nor the versions used in this ticket originally. It looks like the receive event has a populated ui.item property - http://jsfiddle.net/tj_vantoll/FKAuT/.

If anybody else can recreate this please let me know and I can reinvestigate.

comment:9 Changed 7 years ago by Scott González

Resolution: worksforme
Status: closedreopened
Summary: Sortable: callback receive ain't receiving from draggableSortable: ui.helper is null when receiving a draggable clone

The problem is that ui.item refers to the original item and there is no way to reference the helper which is being added to the sortable. I'd updated your fiddle so that the text in ui.item changes on receive so that this is easy to see: http://jsfiddle.net/FKAuT/1/

comment:10 Changed 7 years ago by tj.vantoll

Resolution: duplicate
Status: reopenedclosed

Duplicate of #4303.

Note: See TracTickets for help on using tickets.