Ticket #4752 (closed bug: fixed)
link event firing on sortable with connect list
| Reported by: | rambat | Owned by: | |
|---|---|---|---|
| Priority: | minor | Milestone: | 1.8.7 |
| Component: | ui.sortable | Version: | 1.7.2 |
| Keywords: | Cc: | ||
| Blocking: | Blocked by: |
Description
If you have 2 sortable lists populated with links inside the unordered list elements dropping the element onto a connected list fires the click event.
Dropping on the same list does not fire the event.
Tested with 1.7.2.
You can duplicate this error by injecting a link into a list item on the demo page ( http://jqueryui.com/demos/sortable/#connect-lists)
Then drag that item into the connected list.
Change History
comment:2 Changed 3 years ago by jessicah
I just discovered this today as well, definitely a connectWith issue.
Haven't had it happen in IE8 yet, happens in Chrome and Firefox mostly consistently; occasionally it doesn't fire the link.
comment:3 Changed 3 years ago by awgy
I ran into this issue as well. The click event isn't being prevented when the sorted item moves to a connected sortable. If the sorted item remains in its original list, the click event is properly prevented.
I tracked this down to the _preventClickEvent property used by ui.mouse. It's set to true in _mouseUp(), but it's set for the original container-- which is fine, unless the container changed (which is the case when the item moves to a connected sortable). I've pushed a patch to a GitHub fork that changes the click event prevention to be tied to the event target, not the container.


See also #4845.