Reorder function in dragdrop.js to fix it for Firefox

References #81