There are so many ways to do this, giving the one you'd like would be pretty hard..
First thing you would do is change/set a (boolean) instance variable on collision.
set drag and drop disabled
and set the movement you want based on the state of the instance variable.
You can re-enable the drag and drop and change/set the instance variable back, when the original position is reached.