Replace broken dragend handler with our own version

I couldn't get the normal `dragend` handler working.  I don't know if something else is stealing the event or if it's a browser bug or what.  But after giving it some time and getting nowhere, I decided it was easier to create our own.

@youngca @scottnc27603 would you mind reviewing?