handle "replace to trash" event