Search and Top Navigation
#8842 closed bug (notabug)
Opened November 22, 2012 11:29AM UTC
Closed November 29, 2012 01:39PM UTC
Last modified November 29, 2012 04:21PM UTC
Sortable ui.sender is null in stop
Reported by: | jplevene | Owned by: | jplevene |
---|---|---|---|
Priority: | minor | Milestone: | 1.10.0 |
Component: | ui.sortable | Version: | 1.9.1 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
see http://jsfiddle.net/39ZvN/6/
When dragged from another list, ui.sender is null in stop.
Attachments (0)
Change History (8)
Changed November 23, 2012 04:52PM UTC by comment:1
owner: | → jplevene |
---|---|
status: | new → pending |
Changed November 28, 2012 02:29PM UTC by comment:2
_comment0: | I have tried it with the latest JQuery and JQuery UI on my PC and still the same error. At the time of writing this, there is a problem with the jfiddle servers, in that it would not load. I will try to do a jfiddle example as asked another time when jfiddle is hopefully working again. → 1354113068139345 |
---|---|
status: | pending → new |
I have tried it with the latest JQuery and JQuery UI on my PC and still the same error. At the time of writing this, there is a problem with the jfiddle servers, in that it would not load. I will try to do a jfiddle example as asked another time when jfiddle is hopefully working again.
(I need to use jfiddle to get the code I used)
Changed November 29, 2012 02:41AM UTC by comment:3
status: | new → pending |
---|
jsFiddle should be back up.
Changed November 29, 2012 09:52AM UTC by comment:4
_comment0: | New jfiddle http://jsfiddle.net/jplevene/FEbxQ/2/ → 1354182984454846 |
---|---|
status: | pending → new |
New jfiddle http://jsfiddle.net/jplevene/FEbxQ/2/
Drag and drop from one list to the other
Changed November 29, 2012 01:36PM UTC by comment:5
Per the docs (http://api.jqueryui.com/sortable/#event-stop)
ui.senderis only populated if the item comes from another
sortable.
Therefore, in your example if you sort within the same list
ui.senderwill always be
nulland that is expected.
If I move a sortable item from
#sort1to
#sort2,
#sort1's
stopevent has a
null
ui.sender. This is expected as well.
#sort2's
receiveevent fires and it has a popuplated
ui.sender.
#sort2's
stopevent is not fired when it receives a sortable item and I believe that is expected behavior as well. Therefore I believe everything here is working as intended. scott_gonzalez?
Changed November 29, 2012 01:39PM UTC by comment:6
resolution: | → notabug |
---|---|
status: | new → closed |
Yes, that all sounds right. start
and stop
are paired, so you'd only get a stop
event on the sortable that started the sort, which will not have a sender since it is the origin of the sort.
Changed November 29, 2012 04:07PM UTC by comment:7
Replying to [comment:6 scott.gonzalez]:
Yes, that all sounds right.start
andstop
are paired, so you'd only get astop
event on the sortable that started the sort, which will not have a sender since it is the origin of the sort.
Then there is another bug as stop is still fired when an item is dropped from another list. This also means that sender will always be null, therefore why have it there anyway?
Changed November 29, 2012 04:21PM UTC by comment:8
Replying to [comment:7 jplevene]:
Replying to [comment:6 scott.gonzalez]: > Yes, that all sounds right.start
andstop
are paired, so you'd only get astop
event on the sortable that started the sort, which will not have a sender since it is the origin of the sort. Then there is another bug as stop is still fired when an item is dropped from another list. This also means that sender will always be null, therefore why have it there anyway?
stopwill only be fired if the sorting action originated from that
sortable.
But I believe you are correct that
ui.senderwill always be
nullin the
stopevent. I believe it's there for consistency in case you wanted to use the same function to handle multiple sort events.
Hi jplevene. Thanks for taking the time to contribute to the jQuery UI project!
The test case you provided is using jQuery 1.8.7. Can you please try your example on the latest version to see if the issue still exists. To get you started, use this boilerplate: http://jsfiddle.net/ZgAqH/ Open the link and click to "Fork" (in the top menu) to get started.