Is this supposed to happen?

If I move a character into melee with an enemy they seem to be able to take an attack of opportunity. If I selected an attack action and movement at the same time, the enemy reaction cancels my attack and I lose my action. If I just move into range and then attack I can do it.

theod3