It is one of the things that annoys me.
He gave them time to throw the ball in, and he blew as soon as we headed it clear. Fair enough.
Most refs would leave the guy to put the cross in, if it went behind for a corner he'd probably let them take that as well.
If time is up, it is up.
I admit it is unusual.

