Fly snapping can become an obsessive behavior. Talk to your veterinarian if your dog is fly snapping.
Invisible “flies”
Some dogs appear to watch and bite at the air in front of their faces, as if they are snapping at imaginary flies. This is called "fly snapping" and is more common in certain breeds such as Cavalier King Charles Spaniels, but has been found in many other breeds and breed mixes. There are a number of suspected causes for this behavior, and recent research indicates that gastrointestinal issues are a common contributor. Other diseases involved might include partial epileptic seizures, canine compulsive disorder, or eye disease.
How can I help my dog?
Dogs exhibiting this behavior should be fully examined by a veterinarian to rule out any medical causes. If the behavior is not caused by a medical condition, the behavior could be an obsessive compulsive disorder. Discuss the issue with your veterinarian, a qualified positive trainer, and possibly a veterinary behaviorist, who is a veterinarian that specializes in behavioral medication and treatment.