It sounds like luxating patellas, or the knee cap slips out of place. It occurs fairly commonly, but nothing needs to be done unless the dog is in pain. Also, most vets won't recommend surgery unless the knee caps are out of place more often than not and are causing discomfort. If your dog is comfortable, you don't need to pursue any treatment.