The Defog description on Serebii says:
>This attack also removes the effect of Reflect, Light Screen, Safeguard, Mist, Spikes, Toxic Spikes and Stealth Rock on the target Pokémon's side of battle.
In Pokémon Showdown, my Ferrothorn planted Leech Seed and Stealth Rocks. Then my opponent used Defog to get ride of them, but my Leech Seed was removed as well.
Is this a glitch or is it supposed to do that?