The foul happens outside the box, they then fall over in the box as a result of the foul.
Are you saying that if you push someone over outside the box, but they then fall, or roll, into the box its a penalty?
Also I had a look for the relevant law on where a foul technically takes place (foul...