Opened 5 years ago

Last modified 5 years ago

#9744 new bug

Sortable: incorrect value for ui.sender in sortover events

Reported by: NiGhTTraX Owned by:
Priority: minor Milestone: none
Component: ui.sortable Version: 1.10.4
Keywords: Cc:
Blocked by: Blocking:

Description

I've found out that ui.sender is set to, in my opinion, an incorrect value when:

  1. Sorting a list.
  2. Dragging a connected draggable over the list.

Check this fiddle http://jsfiddle.net/NiGhTTraX/nzSzs/ and do the following:

  1. Start dragging an item in the list on the left.
  2. Drag over an item from the list on the right to the one on the left.

In both cases ui.sender is set to the list on the left. I believe it should be null in both cases since the item is not coming from a (different) sortable.

Here is a commit https://github.com/NiGhTTraX/jquery-ui/commit/4c9e1fe947e9ae34801e43af00e6e32bbe8f1d20 that fixes this issue.

I'd like your opinion on whether this is an actual bug and if it should be fixed to behave like this.

Change History (1)

comment:1 Changed 5 years ago by tj.vantoll

This is tricky. I could see it being convenient to have ui.sender set in an over event, even if the sender is the same list.

But I agree that it probably should be set to null in each of these scenarios; technically there is no "sender". I'm not sure this is something we can change before the interactions rewrite though.

Note: See TracTickets for help on using tickets.