When right-clicking a pokemon you can mount with an item you could use on a pokemon who is out you will mount the pokemon. For example, when feeding a Garchomp a number of Curry items, you will constantly mount them with every click.
It'd be best to make a blacklist including all items you can use on a pokemon who is sent out (TM/TR's, potions, etc.) and then just not allow the mounting action while that item is in the player's hand.
When right-clicking a pokemon you can mount with an item you could use on a pokemon who is out you will mount the pokemon. For example, when feeding a Garchomp a number of Curry items, you will constantly mount them with every click.
It'd be best to make a blacklist including all items you can use on a pokemon who is sent out (TM/TR's, potions, etc.) and then just not allow the mounting action while that item is in the player's hand.