Sliding, pinch-off and detachment of a droplet on a wall in shear flow