This is easy to handle. Just try to drop the piece back on an impossible square, and it will snap back where it came from.
please add this feature to chess.com!!

I had that problem a few times and then I noticed a better work around then the one suggesting to drop it on an illegal square. The problem is sometimes you can't remember what squares are legal or not. I guess you could try dropping it on another one of your own pieces. I haven't tried that. What i do is to drop it off of the board in the game window. Works every time :)
Chess.com is really great! but...how many pieces lost just because the initial square is not highlighted! I mean, you move (not definetly, just testing) and you finally decide to change... but don't remember exactly where it was!
is there some intention to get work this feature?
thanks,
Pere