Dickie Moore couldn't dance, so a double had to wear a Dickie Moore mask for all of the dance sequences.
At Marty's party in the jitterbug dance sequence with Annie, Roland Dupree (who played Joey) was the one who actually danced with Shirley Temple instead of Dickie Moore. Shots of the dance sequence were done at a distance with a close-up of Dickie Moore at the very end.
This is not the first time Guy Kibbee ('Grandpop') worked opposite Shirley Temple. He had the titular role in 1936's "Captain January," playing a father figure to Temple's 'Star.'
Dickie Moore would recall that the much-publicized scene in which he kisses Shirley Temple was extremely embarrassing for him, inasmuch as it was the first time he had ever kissed any girl; conversely, in her autobiography, Temple cheekily pointed out that it most certainly wasn't her first time, and that she breezed through the scene with her customary professional aplomb.