Ticket #8430 (closed bug: fixed)
draggable with sortable makes sortable event "receive" triggered wrong
| Reported by: | yuan | Owned by: | yuan |
|---|---|---|---|
| Priority: | minor | Milestone: | 1.8.22 |
| Component: | ui.draggable | Version: | 1.8.21 |
| Keywords: | Cc: | ||
| Blocking: | Blocked by: |
Description
When draggable element connect with sortable element, the bug may appear, the event for receive of sortable may be triggered twice, one stand for "fromOutside", one not.
How to repoduce:
First, drag one draggable element to sortable container, drag it into container(name it "C"), then put it back. Now, if you drag one element from container "C" to another sortable container. Then you could find the event "receive" trigged twice.
Test case: http://jsfiddle.net/wedgwood/qmDnz/4/
Change History
comment:2 follow-up: ↓ 3 Changed 11 months ago by scott.gonzalez
- Owner set to yuan
- Status changed from new to pending
I can't reproduce this. Your steps seem to be impossible to follow. Specifically "then put it back," since you can not drag the item back to the column of draggables.
comment:3 in reply to: ↑ 2 Changed 11 months ago by wedgwood
Replying to scott.gonzalez:
I can't reproduce this. Your steps seem to be impossible to follow. Specifically "then put it back," since you can not drag the item back to the column of draggables.
You could reproduce it, if you follow steps below:
First, you drag one draggable item over the first sortable container (do not mouseout).
After you see the grey placeholder, you may continue to move the draggable item down to make it between first and second sortable container to make draggable item not be contained by any of them (i.e. you could not see the placeholder). Then, do mouseout.
Now, you could move one sortable item from first container to any other sortable item. You will find the receive event trigged twice(one stand for "from draggable", one stand for "from sortable").
comment:4 Changed 11 months ago by scott.gonzalez
- Status changed from pending to open
Thanks for the more detailed explanation. I'm able to reproduce this and confirm that your patch fixes it.
comment:5 Changed 10 months ago by Baoju Yuan
- Status changed from open to closed
- Resolution set to fixed
Sortable: Reset fromOutside property when canceling helper removal. Fixes #8430 - draggable with sortable makes sortable event receive triggered wrong.
Changeset: dcea4f043adc7f37674feead31ded148d311ab72
comment:6 Changed 10 months ago by Baoju Yuan
Sortable: Reset fromOutside property when canceling helper removal. Fixes #8430 - draggable with sortable makes sortable event receive triggered wrong. (cherry picked from commit dcea4f043adc7f37674feead31ded148d311ab72)
Changeset: 347aa335f001c6e80e6670c90c6262a358b89932


I have fixed it with pull request https://github.com/jquery/jquery-ui/pull/692.