x2!I can not stand those videos, photos, etc found in great number on facebook with a comment on how their dog is so great with kids-
>>Little Betsy is riding the dog. Isn't that cute? Fido even lets her pull his ears and tail.
>>Fido is put to sleep when his arthritis hurts and he gets grumpy when Little Betsy rides him or he has an ear infection and Little Betsy pulled his ear.
>>Little Betsy had to have plastic surgery, all she did was walk up to a stranger's dog to kiss and hug it and the mean dog bit her.
Even though my dogs are used to kids I still keep a hand on the dog when a child wants to pet them, usually I'm holding the dog's beard. I don't trust other people or kids to behave correctly. I even have a spiel when a child approaches to pet any of the dogs. You must ask three times to pet a dog, any dog. Ask the adult with you. Ask the adult with the dog. Ask the dog. I have been known to scold both adults and children if they pet without asking! This is not a petting zoo.
I think it's even more important to teach children to be repectful of dogs when they have their own at home! Teach the child to behave properly around all dogs (don't sit on them; don't stick your hands, etc in their face; don't try and take their food/treats/toys; don't chase them, etc, etc) and the chance of a bad encounter with a strange dog is greatly reduced; not eliminated (that's the parents job) but reduced.

