title: JQuery Sortable "Out" Event
body: <p>I have two HTML unordered lists that I am using as a shopping cart in conjunction with jQuery draggable and sortable as demonstrated on their website demos.</p>
  <p>We have a requirement that if a user drags an item outside of the selected items of the shopping cart, it is supposed to be removed.</p>
  <p>We also are using MVC 5 and Ajax to update the shopping cart for every completed action... if an item is dragged into the selected items, it is added to a database table or cache immediately.  If an item is sorted in the selected items list, we capture the old index and new index and update the precedence value on the backend immediately.  These two features are working fine.</p>
  <p>The issue I have is that according to the documentation (<a href="https://api.jqueryui.com/sortable/#event-out" rel="nofollow noreferrer">https://api.jqueryui.com/sortable/#event-out</a>) and proven through Inspect Element is that the &quot;Out&quot; event for jQuery sortable might fire on two different occasions:</p>
  <ol>
  <li><p>if a sortable item is dragged outside of its container.</p>
  </li>
  <li><p>if the sortable item is dropped.</p>
  </li>
  </ol>
  <p>Correct me if I am wrong, but the second time that the out event fires doesn't make sense to me.  The &quot;out&quot; event will fire also if, let's say the user starts to move an item, but then doesn't move an item and releases the mouse.</p>
  <p>How do you accurately determine if a sortable item has been dragged and dropped outside of its container list (not moved within its container)?</p>