Cancelling drag and drop

In my application the tree is situated in an iframe. If I select an element in the tree and drag it out of the iframe and release the mouse button, it seems that I remain in drag mode, that is the mouse button is released but if I move the mouse back into the iframe where the tree is, the dragged item reattaches to the mouse pointer. I can cancel drag with a mouse click but I wonder if there is a more elegant way? It would be nice if the drag operation were to be cancelled when the mouse button is released or if I reenter the iframe with the mouse button released it’s cancelled at that point.

We are using v.1.7.

I just had a look at previous posts. This post implies that there isn’t an easy way to do this:
viewtopic.php?f=3&t=32028

This post suggests a possible workaround:
viewtopic.php?f=3&t=36094