The input boxes run a validation check whenever the user presses enter or focuses out of them; if this check determines the input value to be invalid, the stylesheet will shake.
In your case, you were probably typing some input before you clicked the hint box, thus focusing out of the input and invoking the validation check.