Skip to main content

Search and Top Navigation

#8430 closed bug (fixed)

Opened July 09, 2012 08:33AM UTC

Closed July 16, 2012 02:26PM UTC

Last modified July 24, 2012 07:03PM UTC

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:
Blocked by: Blocking:
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/

Attachments (0)
Change History (8)

Changed July 09, 2012 08:50AM UTC by yuan comment:1

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

Changed July 09, 2012 12:53PM UTC by scottgonzalez comment:2

owner: → yuan
status: newpending

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.

Changed July 11, 2012 04:04AM UTC by wedgwood comment:3

Replying to [comment:2 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").

Changed July 11, 2012 02:02PM UTC by scottgonzalez comment:4

status: pendingopen

Thanks for the more detailed explanation. I'm able to reproduce this and confirm that your patch fixes it.

Changed July 16, 2012 02:26PM UTC by Baoju Yuan comment:5

resolution: → fixed
status: openclosed

Sortable: Reset fromOutside property when canceling helper removal. Fixes #8430 - draggable with sortable makes sortable event receive triggered wrong.

Changeset: dcea4f043adc7f37674feead31ded148d311ab72

Changed July 16, 2012 02:27PM UTC by Baoju Yuan comment:6

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

Changed July 16, 2012 02:27PM UTC by scottgonzalez comment:7

milestone: 1.91.8.22

Changed July 24, 2012 07:03PM UTC by jjoemb comment:8

I believe this also fixes #8162