Search and Top Navigation
#4303 open bug ()
Opened March 09, 2009 10:07AM UTC
Last modified February 26, 2015 10:34PM UTC
sortable: receive: ui.item references the source element
Reported by: | Marc Diethelm | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | 2.0.0 |
Component: | ui.sortable | Version: | 1.7 |
Keywords: | haspatch | Cc: | |
Blocked by: | Blocking: |
Description
I used to be able to manipulate/replace a dropped element (dragged from a draggable with helper: "clone") in the sortable's receive handler using ui.item. But now ui.item references the source element.
Attachments (2)
Change History (18)
Changed March 09, 2009 10:43AM UTC by comment:1
Changed March 18, 2009 10:38AM UTC by comment:2
component: | ui.core → ui.sortable |
---|
Changed March 18, 2009 12:57PM UTC by comment:3
resolution: | → invalid |
---|---|
status: | new → closed |
This is as designed. The property you want is ui.helper.
Changed March 25, 2009 07:15PM UTC by comment:4
Altering ui.helper seems to have no effect for me. And I'm not sure I understand why ui.item and ui.sender both refer to the same element now. ui.item used to refer to the dropped element.
Something changed in 1.7, my old code was working fine in 1.6. Its not clear to me what the workaround should be to alter the contents of a dropped element in a sortable's receive callback.
Changed March 26, 2009 05:08PM UTC by comment:5
resolution: | invalid |
---|---|
status: | closed → reopened |
Changed March 26, 2009 05:08PM UTC by comment:6
milestone: | TBD → 1.8 |
---|---|
owner: | → rdworth |
status: | reopened → assigned |
Changed August 05, 2009 07:35AM UTC by comment:7
This makes it work for me, no guarantees tough.
The patch is against 1.7.2 ..
Changed November 05, 2009 10:19PM UTC by comment:8
Thank you! sortable-item-sender.patch is exactly what I need. Similar use case - I alter ui.item with html() or replaceWith() in the receive handler.
Without the patch, there's no easy way to alter the item before it's inserted to the Sortable, as ui.helper is a throw-away clone, and ui.sender (in my use case) is merely a thumbnail image. Unpatched seems to always clone ui.sender.
Changed October 01, 2010 06:15AM UTC by comment:9
Thanks for the patch, I had to use this on v1.8 to get it working, otherwise there is no easy way to manipulate the dropped item.
Changed October 19, 2010 03:52PM UTC by comment:10
priority: | critical → major |
---|
Changed January 18, 2011 04:13PM UTC by comment:11
Replying to [comment:7 asannes]:
This makes it work for me, no guarantees tough. The patch is against 1.7.2
..
Where can I find this patch?
Changed February 24, 2012 01:47PM UTC by comment:12
I also applied this patch in order to be able to modify the dropped element in the sortreceive callback. Works with 1.8.18.
Changed October 11, 2012 02:54PM UTC by comment:13
milestone: | 1.9.0 → 2.0.0 |
---|
Changed October 19, 2012 05:49PM UTC by comment:14
owner: | rdworth |
---|---|
status: | assigned → open |
This is still valid. And the attached patch works. The lines have moved, but they're here now:
I'm taking this off of Richard as he hasn't touched this ticket in 4 years.
Changed October 19, 2012 05:51PM UTC by comment:15
keywords: | → haspatch |
---|
Changed February 28, 2013 02:44AM UTC by comment:16
The following test case shows this http://jsfiddle.net/tj_vantoll/5fJ6q/.
Changed February 28, 2013 01:21PM UTC by comment:17
#4253 is a duplicate of this ticket.
Changed February 26, 2015 10:34PM UTC by comment:18
#11227 is a duplicate of this ticket.
forgot to set the component...