Fix the drag and drop issue when mouseup isn't triggered