I'm betting he wasn't actually 'dancing' in the dictionary sense.
I am sure he was not. More than likely, he was telling himself, that he wished he had not done that.