title: Alternatives to trigger('mouseup') to stop dragging programmatically
body: <p>As it seems like I have found a bug in jquery:<br />
  <a href="https://stackoverflow.com/questions/2916152/jquery-draggable-throws-error-when-mouseup-is-triggered">jquery draggable throws error when &#39;mouseup&#39; is triggered</a>
  Can I get some advice on how to implement the following functionality without using the trigger?
  I want to be able to stop an element to be dragged when a condition has been reached, I have been trying lot's of possibilities but none works automatically, even though the event is fired when condition is true it only takes effect when you "mouseup" the dragger.
  I'm really trapped on this, any help will be very appreciated.
  P.D: I have already posted the bug in jquery.ui</p>